ClaimsSignature
This commit is contained in:
parent
484182a0f8
commit
052a86f28a
1 changed files with 5 additions and 1 deletions
|
@ -25,6 +25,10 @@ type Claims interface {
|
||||||
GetAuthenticationContextClassReference() string
|
GetAuthenticationContextClassReference() string
|
||||||
GetAuthTime() time.Time
|
GetAuthTime() time.Time
|
||||||
GetAuthorizedParty() string
|
GetAuthorizedParty() string
|
||||||
|
ClaimsSignature
|
||||||
|
}
|
||||||
|
|
||||||
|
type ClaimsSignature interface {
|
||||||
SetSignatureAlgorithm(algorithm jose.SignatureAlgorithm)
|
SetSignatureAlgorithm(algorithm jose.SignatureAlgorithm)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +127,7 @@ func CheckAuthorizedParty(claims Claims, clientID string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func CheckSignature(ctx context.Context, token string, payload []byte, claims Claims, supportedSigAlgs []string, set KeySet) error {
|
func CheckSignature(ctx context.Context, token string, payload []byte, claims ClaimsSignature, supportedSigAlgs []string, set KeySet) error {
|
||||||
jws, err := jose.ParseSigned(token)
|
jws, err := jose.ParseSigned(token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ErrParse
|
return ErrParse
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue