Discover Packages
github.com/arivax/go-library-v1/security
package
module
Version:
v0.0.0-...-5ba626f
Opens a new window with list of versions in this module.
Published: May 26, 2021
License: GPL-3.0
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
GetToken request token
@Summary Get token
@Description Get token based on username and password
@Tags Token
@Accept json
@Produce json
@Success 201 {string} Jwt
@Failure 400 {string} error
@Router /Auth/getToken [post]
type UserCredential struct {
Username string `json:"username"`
Password string `json:"password"`
}
type UserToken struct {
User string `json:"user"`
Email string `json:"email"`
Role string `json:"role"`
Rights string `json:"rights"`
Token string `json:"token"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.