Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAuthentication ¶
func CheckAuthentication() gin.HandlerFunc
func IsAuthenticated ¶
func IsAuthenticated() gin.HandlerFunc
Types ¶
type Authenticator ¶
type Authenticator interface {
Authentiicate(*gin.Context) (SecurityToken, error)
}
type JwtAuthenticator ¶
type JwtAuthenticator struct { }
func NewJwtAuthenticator ¶
func NewJwtAuthenticator() JwtAuthenticator
func (JwtAuthenticator) Authentiicate ¶
func (a JwtAuthenticator) Authentiicate(c *gin.Context) (SecurityToken, error)
type SecurityToken ¶
type Token ¶
type Token struct { RawToken string Username string `json:"username"` Organisation string `json:"organisation"` Authenticated bool }
func (Token) GetOrganisation ¶
func (Token) GetRawToken ¶
func (Token) GetUsername ¶
func (Token) IsAuthenticated ¶
Click to show internal directories.
Click to hide internal directories.