Documentation
¶
Index ¶
- func HasCode(err error, code ErrorCode) bool
- type AuthorizationError
- type Authorizer
- func (authorizer *Authorizer) ClaimVerified(claims Claims, now time.Time) error
- func (authorizer *Authorizer) IsClaimed(jti string, now time.Time) (bool, error)
- func (authorizer *Authorizer) Verify(compactJWS string, binding Binding, now time.Time) (Claims, error)
- func (authorizer *Authorizer) VerifyAndClaim(compactJWS string, binding Binding, now time.Time) (Claims, error)
- type Binding
- type Claims
- type ErrorCode
- type ProtectedHeader
- type Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthorizationError ¶
type AuthorizationError struct {
Code ErrorCode
}
func (*AuthorizationError) Error ¶
func (err *AuthorizationError) Error() string
type Authorizer ¶
type Authorizer struct {
// contains filtered or unexported fields
}
func NewAuthorizer ¶
func (*Authorizer) ClaimVerified ¶
func (authorizer *Authorizer) ClaimVerified(claims Claims, now time.Time) error
func (*Authorizer) VerifyAndClaim ¶
type Claims ¶
type Claims struct {
Issuer string `json:"iss"`
Audience string `json:"aud"`
JTI string `json:"jti"`
IssuedAt int64 `json:"iat"`
NotBefore int64 `json:"nbf"`
ExpiresAt int64 `json:"exp"`
SessionID string `json:"session_id"`
ConnectionID string `json:"connection_id"`
Generation int64 `json:"generation"`
OfferingID string `json:"offering_id"`
GatewayID string `json:"gateway_id"`
Mode string `json:"mode"`
Protocol string `json:"protocol"`
ConnectBefore int64 `json:"connect_before"`
HardStopAt int64 `json:"hard_stop_at"`
SessionConnectedMSBefore int64 `json:"session_connected_ms_before"`
MaxSessionConnectedMS int64 `json:"max_session_connected_ms"`
Scope []string `json:"scope"`
Nonce string `json:"nonce"`
}
type ProtectedHeader ¶
Click to show internal directories.
Click to hide internal directories.