Documentation ¶
Index ¶
- Constants
- func ClaimFullName(r *http.Request) string
- func ClaimGetRoles(r *http.Request) []string
- func ClaimGetRolesFromContext(ctx context.Context) []string
- func ClaimIsInRole(ctx context.Context, role string) bool
- func ClaimUserName(r *http.Request) string
- func ClaimUserNameFromContext(ctx context.Context) string
- func Init(cfg *utils.Config)
- func JwtMSFTGetPemCert(token *jwt.Token) (string, error)
- func JwtRoleCheckerADMINISTRATOR(next http.Handler) http.Handler
- func JwtRoleCheckerContextADMINISTRATOR(ctx context.Context) (err error)
- func JwtRoleCheckerContextUSER(ctx context.Context) (err error)
- func JwtRoleCheckerSYSTEM(next http.Handler) http.Handler
- func JwtRoleCheckerUSER(next http.Handler) http.Handler
- type CustomClaimsShieldoo
- type JSONWebKeys
- type Jwks
Constants ¶
View Source
const ( ROLE_SYSTEM = "SYSTEM" ROLE_ADMINISTRATOR = "ADMINISTRATOR" ROLE_USER = "USER" )
Variables ¶
This section is empty.
Functions ¶
func ClaimFullName ¶
func ClaimGetRoles ¶
func ClaimUserName ¶
Types ¶
type CustomClaimsShieldoo ¶
type CustomClaimsShieldoo struct { Name string `json:"name"` Upn string `json:"upn,omitempty"` UniqueName string `json:"unique_name,omitempty"` PreferredName string `json:"preferred_username,omitempty"` Roles []string `json:"roles,omitempty"` Provider string `json:"provider,omitempty"` Tenant string `json:"tenant,omitempty"` }
func ClaimGetCustom ¶
func ClaimGetCustom(r *http.Request) *CustomClaimsShieldoo
func ClaimGetCustomFromContext ¶
func ClaimGetCustomFromContext(ctx context.Context) *CustomClaimsShieldoo
type JSONWebKeys ¶
type Jwks ¶
type Jwks struct {
Keys []JSONWebKeys `json:"keys"`
}
Click to show internal directories.
Click to hide internal directories.