package
0.0.0-20230211010958-c91f845b7845
Repository: https://github.com/pixdale/sh-code-challenge.git
Documentation: pkg.go.dev
# Functions
CreateToken creates a token for a given user and role.
ExtractToken extracts the token string from a given request the function checks for the token inside the query string and inside the headers.
ExtractTokenID extracts the User ID from the token of a given request.
HasRoleManager checks if the given token has a Manager Role.
HasRoleTechnician checks if the given token has a Technician Role.
TokenValid validates a token in a given request.