Documentation ¶
Index ¶
- Constants
- func AuthorizeRequest(request sip.Request, response sip.Response, user, password sip.MaybeString) error
- type AuthSession
- type Authorization
- func (auth *Authorization) CalcResponse(request sip.Request) *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 RequestCredentialCallback
- type ServerAuthorizer
Constants ¶
View Source
const (
NonceExpire = 180 * time.Second
)
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(request sip.Request) *Authorization
calculates Authorization response https://www.ietf.org/rfc/rfc2617.txt
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 RequestCredentialCallback, realm string, authInt bool) *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.