package
0.0.0-20230404135201-3ebf4734acd4
Repository: https://github.com/fiware/vcbackend.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

DecodeSegment decodes a JWT specific base64url encoding with padding stripped Deprecated: In a future release, we will demote this function to a non-exported function, since it should only be used internally.
EncodeSegment encodes a JWT specific base64url encoding with padding stripped Deprecated: In a future release, we will demote this function to a non-exported function, since it should only be used internally.
GetAlgorithms returns a list of registered "alg" names.
GetSigningMethod retrieves a signing method from an "alg" string.
New creates a new Token with the specified signing method and an empty map of claims.
NewNumericDate constructs a new *NumericDate from a standard library time.Time struct.
NewParser creates a new Parser with the specified options.
NewValidationError is a helper for constructing a ValidationError with a string error message.
NewWithClaims creates a new Token with the specified signing method and claims.
Parse parses, validates, verifies the signature and returns the parsed token.
ParseECPrivateKeyFromPEM parses a PEM encoded Elliptic Curve Private Key Structure.
ParseECPublicKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 public key.
ParseEdPrivateKeyFromPEM parses a PEM-encoded Edwards curve private key.
ParseEdPublicKeyFromPEM parses a PEM-encoded Edwards curve public key.
No description provided by the author
ParseRSAPrivateKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 private key.
ParseRSAPrivateKeyFromPEMWithPassword parses a PEM encoded PKCS1 or PKCS8 private key protected with password Deprecated: This function is deprecated and should not be used anymore.
ParseRSAPublicKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 public key.
No description provided by the author
RegisterSigningMethod registers the "alg" name and a factory function for signing method.
WithJSONNumber is an option to configure the underlying JSON parser with UseNumber.
WithoutClaimsValidation is an option to disable claims validation.
WithValidMethods is an option to supply algorithm methods that the parser will check.

# Constants

AUD validation failed.
Generic claims validation error.
EXP validation failed.
JTI validation failed.
IAT validation failed.
ISS validation failed.
Token is malformed.
NBF validation failed.
Signature validation failed.
Token could not be verified because of signing problems.

# Variables

DecodePaddingAllowed will switch the codec used for decoding JWTs respectively.
Sadly this is missing from crypto/ecdsa compared to crypto/rsa.
No description provided by the author
Error constants.
Error constants.
Error constants.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Specific instances for HS256 and company.
Error constants.
Error constants.
Error constants.
Error constants.
Error constants.
Error constants.
Error constants.
Error constants.
Error constants.
Error constants.
MarshalSingleStringAsArray modifies the behaviour of the ClaimStrings type, especially its MarshalJSON function.
Specific instance for EdDSA.
Specific instances for EC256 and company.
Specific instances for EC256 and company.
Specific instances for EC256 and company.
Specific instances for HS256 and company.
Specific instances for HS256 and company.
Specific instances for HS256 and company.
Specific instances for RS/PS and company.
Specific instances for RS/PS and company.
Specific instances for RS/PS and company.
Specific instances for RS256 and company.
Specific instances for RS256 and company.
Specific instances for RS256 and company.
TimeFunc provides the current time when parsing token to validate "exp" claim (expiration time).
TimePrecision sets the precision of times and dates within this library.

# Structs

No description provided by the author
NumericDate represents a JSON numeric date value, as referenced at https://datatracker.ietf.org/doc/html/rfc7519#section-2.
No description provided by the author
RegisteredClaims are a structured version of the JWT Claims Set, restricted to Registered Claim Names, as referenced at https://datatracker.ietf.org/doc/html/rfc7519#section-4.1 This type can be used on its own, but then additional private and public claims embedded in the JWT will not be parsed.
SigningMethodECDSA implements the ECDSA family of signing methods.
SigningMethodEd25519 implements the EdDSA family.
SigningMethodHMAC implements the HMAC-SHA family of signing methods.
SigningMethodRSA implements the RSA family of signing methods.
SigningMethodRSAPSS implements the RSAPSS family of signing methods signing methods.
Token represents a JWT Token.
No description provided by the author
ValidationError represents an error from Parse if token is not valid.

# Interfaces

Claims must just have a Valid method that determines if the token is invalid for any supported reason.
SigningMethod can be used add new methods for signing or verifying tokens.

# Type aliases

ClaimStrings is basically just a slice of strings, but it can be either serialized from a string array or just a string.
Keyfunc will be used by the Parse methods as a callback function to supply the key for verification.
MapClaims is a claims type that uses the map[string]interface{} for JSON decoding.
ParserOption is used to implement functional-style options that modify the behavior of the parser.