package
0.0.0-20240810175236-332ce6e1e724
Repository: https://github.com/simpleauthlink/authapi.git
Documentation: pkg.go.dev

# Functions

DecodeUserToken function decodes the user information from the token provided and returns the app id and the user id.
EncodeUserToken function encodes the user information into a token and returns it.
Hash generates a hash of the input string using SHA-256 algorithm.
RandBytes generates a random byte slice of length n.
SafeURL function returns a safe URL string from the provided URL.

# Constants

AppEndpointPath constant is the path used to API endpoints related to apps.
AppIdSize constant is the size of the app id, which is an integer with a value of 8 (bytes).
AppNonceSize constant is the size of the app nonce, which is an integer with a value of 4 (bytes).
AppSecretHeader constant is the header used to send the app secret in the request.
DefaultAPIEndpoint constant is the default API endpoint used by the client.
users.
EmailHashSize constant is the size of the email hash, which is an integer with a value of 4 (bytes).
HealthCheckPath constant is the path used to check the health of the API server.
seconds.
SecretSize constant is the size of the secret, which is an integer with a value of 16 (bytes).
TokenQueryParam constant is the query parameter used to send the token in the request.
TokenSeparator constant is the separator used to split the token into parts.
TokenSize constant is the size of the token, which is an integer with a value of 8 (bytes).
UserEndpointPath constant is the path used to API endpoints related to users.
UserIdSize constant is the size of the user id, which is an integer with a value of 4 (bytes).