package
1.1.3
Repository: https://github.com/infinitbyte/framework.git
Documentation: pkg.go.dev

# Functions

GetAuthenticateFunc return function to authenticate request using jwt token.
IssueAccessToken issue jwt access token for the provided user info.
SetAudience sets token audience(aud), no default value.
SetExpDuration sets token exp duartion, Default Value 5 min.
SetIssuer sets token issuer(iss), no default value.
SetNamedScopes sets the access token scopes,.

# Constants

EdDSA signature algorithm.
ES256 signature algorithm -- ECDSA using P-256 and SHA-256.
ES384 signature algorithm -- ECDSA using P-384 and SHA-384.
ES512 signature algorithm -- ECDSA using P-521 and SHA-512.
HS256 signature algorithm -- HMAC using SHA-256.
HS384 signature algorithm -- HMAC using SHA-384.
HS512 signature algorithm -- HMAC using SHA-512.
PS256 signature algorithm -- RSASSA-PSS using SHA256 and MGF1-SHA256.
PS384 signature algorithm -- RSASSA-PSS using SHA384 and MGF1-SHA384.
PS512 signature algorithm -- RSASSA-PSS using SHA512 and MGF1-SHA512.
RS256 signature algorithm -- RSASSA-PKCS-v1.5 using SHA-256.
RS384 signature algorithm -- RSASSA-PKCS-v1.5 using SHA-384.
RS512 signature algorithm -- RSASSA-PKCS-v1.5 using SHA-512.

# Variables

ErrInvalidAlg is returned by Authenticate Strategy method, when jwt token alg header does not match key algorithm.
ErrMissingKID is returned by Authenticate Strategy method, when failed to retrieve kid from token header.

# Structs

StaticSecret implements the SecretsKeeper and holds only a single secret.

# Interfaces

SecretsKeeper hold all secrets/keys to sign and parse JWT token.