package
0.0.0-20221208033113-692b37bef7b3
Repository: https://github.com/crossedbot/simpleauth.git
Documentation: pkg.go.dev

# Functions

DecodeTotp returns the timed-based OTP for the given based64 encoded message and the OTP issuer.
EncodeTotp returns a base64 encoded message for the given timed-based OTP.
GenerateTokens returns a new access token, and an accompanying refresh token for the given user, and encryption key pair.
GetJwk handles the response to a request for the service's JSON web key.
GetOtpQr handles the response for a request to retrieve the QR image of a users OTP.
HashPassword returns the bcrypt hash of the given password using the default cost of 10.
Login handles the response for a user login request.
LoginWithPublicKey handles a request to login via public key authentication.
New returns a new Controller.
RefreshToken handles the response for a request to refresh access tokens.
RegisterPublicKey handles a request to register the public key for a given user.
SetTotp handles the response to a request to enable TOTP for a user.
SignUp handles the response to a user signup request.
ValidateOtp handles the response to a request to validate a user's OTP.
VerifyPassword returns nil if the given bcrypt hash matches the password.

# Constants

Access Token TTLs.
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
Defaults.
No description provided by the author
No description provided by the author

# Variables

Ctrl is an instance of an authentication service controller.
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
Errors.
Routes represent the authentication HTTP service routes.

# Structs

Config represents the configuration of an authentication service controller.
TokenOptions represents a container for options for generating an access token.

# Interfaces

Controller represents an interface to an authentication service.