package
0.0.0-20240501013003-47a3ff24b75a
Repository: https://github.com/pacodiazdg/backend-blog.git
Documentation: pkg.go.dev
# Functions
From a Request it validates the token and the requested permissions and returns a jwt.MapClaims with the token data.
Create a token with a user's basic data.
ExtractToken.
Generates random String Not secure for cryptographic and related implementations.
gets the token information and returns it in the form of jwt.MapClaims.
Get the ip depending on the configuration if the IpaddressByHeader configuration parameter has a value, it will be used to obtain the ip of that header.
Get the user-agent and return it in EscapeString.
validated if image by mime.
Checks the permissions and compares them with those required to complete the task.
No description provided by the author
Only validate that the token is valid and has not expired.
No description provided by the author
This verifies that the token is valid from an http.Request.
# Constants
.
.
.
No description provided by the author
No description provided by the author
No description provided by the author
.
.
.
.
.
.
# Structs
structure of a user token.