package
0.0.0-20250225105205-8289a55d8107
Repository: https://github.com/mysteriumnetwork/node.git
Documentation: pkg.go.dev
# Functions
NewAuthenticator creates an authenticator.
NewCredentialsManager returns given a password file directory returns a new credentials manager, which can be used to validate or alter user credentials.
NewJWTAuthenticator creates a new JWT authentication instance.
NewJWTEncryptionKey creates and stores or re-uses an existing JWT encryption key.
TokenFromContext retrieve token from request Header or Cookie.
# Constants
JWTCookieName name of the cookie JWT token is stored in.
# Variables
ErrBadCredentials represents an error when validating wrong c.
ErrUnauthorized unauthorized.
# Structs
Authenticator wraps CredentialsManager to provide an easy way of authentication for builtin UI.
CredentialsManager verifies/sets user credentials for web UI.
JWT contains token details.
JWTAuthenticator contains JWT handling methods.
# Interfaces
Storage for Credentials.
# Type aliases
JWTEncryptionKey contains the encryption key for JWT.