Documentation ¶
Index ¶
- func CheckScopes(possibleScopes []string, authorizedScopes []string) bool
- func GetScopesFromJWT(token *jwt.Token) (scopes []string)
- func GetScopestringFromJWT(token *jwt.Token) (scopestring string)
- func GetValidJWT(r *http.Request, publicKey *ecdsa.PublicKey) (token *jwt.Token, err error)
- func IgnoreExpired(err error) error
- func SplitScopeString(scopestring string) (scopeList []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckScopes ¶ added in v0.9.10
CheckScopes checks whether one of the possibleScopes is in the authorized scopes list
func GetScopesFromJWT ¶ added in v0.9.10
func GetScopesFromJWT(token *jwt.Token) (scopes []string)
func GetScopestringFromJWT ¶ added in v0.9.10
func GetScopestringFromJWT(token *jwt.Token) (scopestring string)
GetScopestringFromJWT turns the scopes from a jwt in to a commaseperated scopestring
func GetValidJWT ¶
GetValidJWT returns a validated ES384 signed jwt from the authorization header that needs to start with "bearer " If no jwt is found in the authorization header, nil is returned Validation against the supplied publickey is performed
func IgnoreExpired ¶ added in v0.9.11
IgnoreExpired checks if the input error is only an expired error. Nil is returned in this case, else the original error
func SplitScopeString ¶ added in v0.9.10
SplitScopeString takes a comma seperated string representation of scopes and returns it as a slice
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.