19 lines
507 B
Go
19 lines
507 B
Go
package claims
|
|
|
|
// Tokenizer interface
|
|
type ClaimService interface {
|
|
AddClaimsToToken(userId string, host string) Claims
|
|
DecodeClaimsInToken(host string, method string, forward string, sessionClaims map[string]interface{}, publicKey string) (bool, error)
|
|
}
|
|
|
|
// SessionClaims struct
|
|
type SessionClaims struct {
|
|
AccessToken map[string]interface{} `json:"access_token"`
|
|
IDToken map[string]interface{} `json:"id_token"`
|
|
}
|
|
|
|
// Claims struct
|
|
type Claims struct {
|
|
Session SessionClaims `json:"session"`
|
|
}
|