BAHAMAS
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package claims
|
||||
|
||||
import "oc-auth/conf"
|
||||
|
||||
// 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)
|
||||
DecodeClaimsInToken(host string, method string, forward string, sessionClaims Claims, publicKey string) (bool, error)
|
||||
}
|
||||
|
||||
// SessionClaims struct
|
||||
@@ -16,3 +18,11 @@ type SessionClaims struct {
|
||||
type Claims struct {
|
||||
Session SessionClaims `json:"session"`
|
||||
}
|
||||
|
||||
var t = map[string]ClaimService{
|
||||
"hydra": HydraClaims{},
|
||||
}
|
||||
|
||||
func GetClaims() ClaimService {
|
||||
return t[conf.GetConfig().Auth]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user