auth

package
v1.0.1-0...-c50d641 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeRequest

func AuthorizeRequest(request sip.Request, response sip.Response, user, password sip.MaybeString) error

Types

type AuthSession

type AuthSession struct {
	// contains filtered or unexported fields
}

AuthSession .

type Authorization

type Authorization struct {
	// contains filtered or unexported fields
}

currently only Digest and MD5

func AuthFromValue

func AuthFromValue(value string) *Authorization

func (*Authorization) CalcResponse

func (auth *Authorization) CalcResponse() *Authorization

func (*Authorization) SetMethod

func (auth *Authorization) SetMethod(method string) *Authorization

func (*Authorization) SetPassword

func (auth *Authorization) SetPassword(password string) *Authorization

func (*Authorization) SetUri

func (auth *Authorization) SetUri(uri string) *Authorization

func (*Authorization) SetUsername

func (auth *Authorization) SetUsername(username string) *Authorization

func (*Authorization) String

func (auth *Authorization) String() string

type Authorizer

type Authorizer interface {
	AuthorizeRequest(request sip.Request, response sip.Response) error
}

type ClientAuthorizer

type ClientAuthorizer struct {
	// contains filtered or unexported fields
}

func NewClientAuthorizer

func NewClientAuthorizer(u string, p string) *ClientAuthorizer

func (*ClientAuthorizer) AuthorizeRequest

func (auth *ClientAuthorizer) AuthorizeRequest(request sip.Request, response sip.Response) error

type ServerAuthorizer

type ServerAuthorizer struct {
	// contains filtered or unexported fields
}

ServerAuthorizer Proxy-Authorization | WWW-Authenticate

func NewServerAuthorizer

func NewServerAuthorizer(callback func(username string) (string, error), authInt bool, logger log.Logger) *ServerAuthorizer

NewServerAuthorizer .

func (*ServerAuthorizer) Authenticate

func (auth *ServerAuthorizer) Authenticate(request sip.Request, tx sip.ServerTransaction) (string, bool)

ServerAuthorizer handles Authenticate requests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL