Documentation ¶
Index ¶
- func AuthorizeRequest(request sip.Request, response sip.Response, user, password sip.MaybeString) error
- type AuthSession
- type Authorization
- func (auth *Authorization) CalcResponse() *Authorization
- func (auth *Authorization) SetMethod(method string) *Authorization
- func (auth *Authorization) SetPassword(password string) *Authorization
- func (auth *Authorization) SetUri(uri string) *Authorization
- func (auth *Authorization) SetUsername(username string) *Authorization
- func (auth *Authorization) String() string
- type Authorizer
- type ClientAuthorizer
- type ServerAuthorizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizeRequest ¶
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 ClientAuthorizer ¶
type ClientAuthorizer struct {
// contains filtered or unexported fields
}
func NewClientAuthorizer ¶
func NewClientAuthorizer(u string, p string) *ClientAuthorizer
func (*ClientAuthorizer) AuthorizeRequest ¶
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.
Click to show internal directories.
Click to hide internal directories.