Documentation ¶
Index ¶
- Variables
- func AdminRequiredMiddleware(c *routing.Context) error
- func AuthenticateWithLDAP(email string, password string) bool
- func AuthorizationMiddleware(c *routing.Context) error
- func CheckUserMiddleware(c *routing.Context) error
- func GenerateToken(username string, password string) (string, error)
- func GetAuthenticatedUser(c *routing.Context) userModels.User
- func GetUserFromToken(c *routing.Context) (jwt.MapClaims, error)
- func InitGAPIAuthenticationServer()
- func LdapUserCreateOrUpdate(user userModels.User)
- func NotAuthorized(c *routing.Context) error
- func OAuthClientRequiredMiddleware(c *routing.Context) error
- func UserNotAllowed(c *routing.Context) error
- func ValidateToken(tokenString string) (jwt.MapClaims, error)
- func ValidateUserCredentials(username string, password string) (userModels.User, error)
- type TokenCustomClaims
- type TokenRequestObj
Constants ¶
This section is empty.
Variables ¶
View Source
var EXPIRATION_TIME = MinExpirationTime
View Source
var LDAP_PORT = "389"
View Source
var MinExpirationTime = 30
View Source
var MinSizeSigningKey = 10
View Source
var SERVICE_NAME = "authentication"
View Source
var SIGNING_KEY = "AllYourBase"
Functions ¶
func AdminRequiredMiddleware ¶
func AuthenticateWithLDAP ¶
func AuthorizationMiddleware ¶
func CheckUserMiddleware ¶
func GetAuthenticatedUser ¶
func GetAuthenticatedUser(c *routing.Context) userModels.User
func InitGAPIAuthenticationServer ¶
func InitGAPIAuthenticationServer()
func LdapUserCreateOrUpdate ¶
func LdapUserCreateOrUpdate(user userModels.User)
func NotAuthorized ¶
func UserNotAllowed ¶
func ValidateUserCredentials ¶
func ValidateUserCredentials(username string, password string) (userModels.User, error)
Types ¶
type TokenCustomClaims ¶
type TokenCustomClaims struct { Username string `json:"Username"` jwt.StandardClaims }
type TokenRequestObj ¶
Click to show internal directories.
Click to hide internal directories.