Documentation ¶
Index ¶
- Variables
- func Authorizator(data interface{}, c *gin.Context) bool
- func GenerateAPIKey(n int) (string, error)
- func HashSHA512(str string) string
- func IdentityHandler(c *gin.Context) interface{}
- func PayloadFunc(data interface{}) jwt.MapClaims
- func Unauthorized(c *gin.Context, code int, message string)
- type APIKey
- type JWT
- type Middlewares
- type TLSAuth
Constants ¶
This section is empty.
Variables ¶
View Source
var (
APIKeyHeader = "X-Api-Key"
)
Functions ¶
func Authorizator ¶
func GenerateAPIKey ¶
func HashSHA512 ¶
func IdentityHandler ¶
func PayloadFunc ¶
Types ¶
type APIKey ¶
func (*APIKey) MiddlewareFunc ¶
func (a *APIKey) MiddlewareFunc() gin.HandlerFunc
type JWT ¶
type JWT struct { Middleware *jwt.GinJWTMiddleware DbClient *database.Client TlsAuth *TLSAuth }
type Middlewares ¶
func NewMiddlewares ¶
func NewMiddlewares(dbClient *database.Client) (*Middlewares, error)
type TLSAuth ¶ added in v1.4.0
type TLSAuth struct { AllowedOUs []string CrlPath string // contains filtered or unexported fields }
func NewTLSAuth ¶ added in v1.4.0
func (*TLSAuth) SetAllowedOu ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.