package
0.0.0-20220115132427-a6acc8650ab5
Repository: https://github.com/loopcontext/auth-api-go.git
Documentation: pkg.go.dev

# Functions

ParseAPIKey parse api key from request.
ParseToken parse jwt token from gin context.

# Variables

APIKeyLookup is a string in the form of "<source>:<name>" that is used to extract token from the request.
ErrEmptyAPIKeyHeader can be thrown if authing with a HTTP header, the Auth header needs to be set.
ErrEmptyAuthHeader can be thrown if authing with a HTTP header, the Auth header needs to be set.
ErrEmptyCookieToken can be thrown if authing with a cookie, the token cokie is empty.
ErrEmptyParamToken can be thrown if authing with parameter in path, the parameter in path is empty.
ErrEmptyQueryToken can be thrown if authing with URL Query, the query token variable is empty.
ErrForbidden when HTTP status 403 is given.
ErrInvalidAuthHeader indicates auth header is invalid, could for example have the wrong Realm name.
ErrInvalidSigningAlgorithm indicates signing algorithm is invalid, needs to be HS256, HS384, HS512, RS256, RS384 or RS512.
ErrMissingExpField missing exp field in token.
TokenHeadName is a string in the header.
TokenLookup is a string in the form of "<source>:<name>" that is used to extract token from the request.

# Structs

AuthJWT auth middleware struct.