Fix Access Key requests (#11979)

Fix accessing claims when auth error is unchecked.

Only replaced when unchecked and when clearly without side effects.

Fixes #11959
This commit is contained in:
Klaus Post
2021-04-06 17:35:46 +02:00
committed by Harshavardhana
parent e3da59c923
commit f687ba53bc
2 changed files with 14 additions and 5 deletions

View File

@@ -81,6 +81,15 @@ type MapClaims struct {
jwtgo.MapClaims
}
// GetAccessKey will return the access key.
// If nil an empty string will be returned.
func (c *MapClaims) GetAccessKey() string {
if c == nil {
return ""
}
return c.AccessKey
}
// NewStandardClaims - initializes standard claims
func NewStandardClaims() *StandardClaims {
return &StandardClaims{}