Documentation ¶
Index ¶
Constants ¶
View Source
const ( ISSUER = "https://iam.ng.bluemix.net/oidc/token" ALG = "RS256" )
Variables ¶
View Source
var ( MALFORMED = errors.New("Malformed JWT token") DECODE_FAILURE = errors.New("Decode JWT token failure") UNMARSHAL_FAILURE = errors.New("Unmarshal JWT token failure") UNEXPECTED_ISSUER = errors.New("The issuer in JWT is not supported") EXPIRED_TOKEN = errors.New("Expired token") ISSUE_AT_ERROR = errors.New("Token used before issued") UNSUPPORTED_ALG = errors.New("Unsupported algorithm") )
Functions ¶
func NewJwtAuth ¶
func NewJwtAuth(manager jwk.IbmJwksManager) interfaces.Auth
Types ¶
type IbmJwt ¶
type IbmJwt struct { IbmHeader IbmPayload RawString string }
type IbmPayload ¶
type IbmPayload struct { IamId string `json:"iam_id"` Id string `json:"id"` Realmid string `json:"realmid"` Identifier string `json:"identifier"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Name string `json:"name"` Email string `json:"email"` Sub string `json:"sub"` Account account `json:"account"` Iat int64 `json:"iat"` Exp int64 `json:"exp"` Iss string `json:"iss"` GrantType string `json:"grant_type"` Scope string `json:"scope"` ClientId string `json:"client_id"` Acr int64 `json"acr"` Amr []string `json:"amr"` }
Click to show internal directories.
Click to hide internal directories.