Documentation ¶
Index ¶
- Constants
- 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 CRLChecker
- type JWT
- type Middlewares
- type OCSPChecker
- type RevocationCache
- type TLSAuth
Constants ¶
View Source
const ( APIKeyHeader = "X-Api-Key" BouncerContextKey = "bouncer_info" )
View Source
const MachineIDKey = "id"
Variables ¶
This section is empty.
Functions ¶
func Authorizator ¶
func GenerateAPIKey ¶
func HashSHA512 ¶
func IdentityHandler ¶
func PayloadFunc ¶
Types ¶
type APIKey ¶
func (*APIKey) MiddlewareFunc ¶
func (a *APIKey) MiddlewareFunc() gin.HandlerFunc
type CRLChecker ¶ added in v1.6.3
type CRLChecker struct {
// contains filtered or unexported fields
}
func NewCRLChecker ¶ added in v1.6.3
func NewCRLChecker(crlPath string, onLoad func(), logger *log.Entry) (*CRLChecker, error)
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 OCSPChecker ¶ added in v1.6.3
type OCSPChecker struct {
// contains filtered or unexported fields
}
func NewOCSPChecker ¶ added in v1.6.3
func NewOCSPChecker(logger *log.Entry) *OCSPChecker
type RevocationCache ¶ added in v1.6.3
type RevocationCache struct {
// contains filtered or unexported fields
}
func NewRevocationCache ¶ added in v1.6.3
func NewRevocationCache(expiration time.Duration, logger *log.Entry) *RevocationCache
func (*RevocationCache) Empty ¶ added in v1.6.3
func (rc *RevocationCache) Empty()
func (*RevocationCache) Get ¶ added in v1.6.3
func (rc *RevocationCache) Get(cert *x509.Certificate) (error, bool)
func (*RevocationCache) Set ¶ added in v1.6.3
func (rc *RevocationCache) Set(cert *x509.Certificate, err error)
type TLSAuth ¶ added in v1.4.0
type TLSAuth struct { AllowedOUs []string // contains filtered or unexported fields }
func NewTLSAuth ¶ added in v1.4.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.