Oc Auth x Hydra x LDAP : draft of claims enrich for traefik + draft of forwarding
This commit is contained in:
18
infrastructure/claims/claims.go
Normal file
18
infrastructure/claims/claims.go
Normal file
@@ -0,0 +1,18 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user