Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessControl ¶ added in v0.10.4
type AccessControl struct {
// contains filtered or unexported fields
}
AccessControl middleware to restrict to make POST/PUT/DELETE requests by admin only
func NewAccessControl ¶ added in v0.10.4
func NewAccessControl(audience, userIDClaim string, getUser GetUser) *AccessControl
NewAccessControl instance constructor
type AuthMiddleware ¶ added in v0.15.0
type AuthMiddleware struct {
// contains filtered or unexported fields
}
AuthMiddleware middleware to verify personal access tokens (PAT) and JWT tokens
func NewAuthMiddleware ¶ added in v0.15.0
func NewAuthMiddleware(getAccountFromPAT GetAccountFromPATFunc, validateAndParseToken ValidateAndParseTokenFunc, markPATUsed MarkPATUsedFunc, checkUserAccessByJWTGroups CheckUserAccessByJWTGroupsFunc, claimsExtractor *jwtclaims.ClaimsExtractor, audience string, userIdClaim string) *AuthMiddleware
NewAuthMiddleware instance constructor
type CheckUserAccessByJWTGroupsFunc ¶ added in v0.25.0
type CheckUserAccessByJWTGroupsFunc func(ctx context.Context, claims jwtclaims.AuthorizationClaims) error
CheckUserAccessByJWTGroupsFunc function
type GetAccountFromPATFunc ¶ added in v0.15.0
type GetAccountFromPATFunc func(ctx context.Context, token string) (*server.Account, *server.User, *server.PersonalAccessToken, error)
GetAccountFromPATFunc function
type GetUser ¶ added in v0.20.0
GetUser function defines a function to fetch user from Account by jwtclaims.AuthorizationClaims
type MarkPATUsedFunc ¶ added in v0.15.0
MarkPATUsedFunc function
Click to show internal directories.
Click to hide internal directories.