Documentation ¶
Index ¶
- Constants
- func ApplicationHandler(w http.ResponseWriter, r *http.Request)
- func BootstrapHandler(w http.ResponseWriter, r *http.Request)
- func CloneHeader(h http.Header) http.Header
- func GetSIPAuthDataItem(a diameter.AVP) (rand, autn, auts, xres, ck, ik []byte, e error)
- func KeyDerivation(ck, ik, rand []byte, impi, naf string, vid uint8, pid uint32) []byte
- func NewRandText() string
- func SetSIPAuthDataItem(rand, autn, auts, xres, ck, ik []byte) (a diameter.AVP)
- type AV
- type AuthenticationInfo
- type Authorization
- type WWWAuthenticate
Constants ¶
View Source
const IdentityUnknown uint32 = 10415*10000 + 5401
IdentityUnknown Diameter response code
Variables ¶
This section is empty.
Functions ¶
func ApplicationHandler ¶
func ApplicationHandler(w http.ResponseWriter, r *http.Request)
func BootstrapHandler ¶
func BootstrapHandler(w http.ResponseWriter, r *http.Request)
func GetSIPAuthDataItem ¶
GetSIPAuthDataItem read SIP-Auth-Data-Item AVP
func KeyDerivation ¶
func KeyDerivationFromCache(btid string, naf string, vid uint8, pid uint32) []byte { av, _ := getCachedAV(btid) if av.RAND == nil { return nil } return KeyDerivation(av.CK, av.IK, av.RAND, av.IMPI, naf, vid, pid) }
func NewRandText ¶
func NewRandText() string
func SetSIPAuthDataItem ¶
SetSIPAuthDataItem make SIP-Auth-Data-Item AVP
Types ¶
type AV ¶
type AV struct { RAND []byte // 128 bit AKA RAND AUTN []byte // SQN(48)+AMF(16)+MAC(64)=128 bit AKA AUTN RES []byte // 128 bit AKA RES IK []byte // 128 bit AKA IK CK []byte // 128 bit AKA CK IMPI string }
func MultimediaAuthRequest ¶
func (AV) MarshalJSON ¶
func (AV) MarshalText ¶
func (*AV) UnmarshalJSON ¶
func (*AV) UnmarshalText ¶
type AuthenticationInfo ¶
type AuthenticationInfo struct { Nextnonce string //mandatory Qop string //mandatory, not quoted Rspauth [16]byte Cnonce string Nc uint64 // not quoted }
func ParseaAuthenticationInfo ¶
func ParseaAuthenticationInfo(s string) (a AuthenticationInfo, e error)
func (AuthenticationInfo) String ¶
func (a AuthenticationInfo) String() string
type Authorization ¶
type Authorization struct { Username string // mandatory Realm string // mandatory Nonce string // mandatory Uri string // mandatory Response [16]byte // mandatory Algorithm string // not quoted Cnonce string Opaque string Qop string // mandatory, not quoted Nc uint64 // not quoted // Userhash bool Auts string }
func ParseaAuthorization ¶
func ParseaAuthorization(s string) (a Authorization, e error)
func (*Authorization) SetBootstrapNonce ¶
func (a *Authorization) SetBootstrapNonce(rand, autn []byte)
func (*Authorization) SetResponse ¶
func (a *Authorization) SetResponse(method string, pwd, body []byte)
func (Authorization) String ¶
func (a Authorization) String() string
type WWWAuthenticate ¶
type WWWAuthenticate struct { Realm string // mandatory Domain []string Nonce string // mandatory Opaque string Stale bool // not quoted Algorithm string // not quoted Qop []string //mandatory }
func ParseaWWWAuthenticate ¶
func ParseaWWWAuthenticate(s string) (a WWWAuthenticate, e error)
func (WWWAuthenticate) String ¶
func (a WWWAuthenticate) String() string
Click to show internal directories.
Click to hide internal directories.