auth.authz package
public struct AuthzChecker
Representation of AuthzChecker
Field Name | Data Type | Description | Default Value |
---|---|---|---|
permissionstore | PermissionStore | authzCache: authorization cache instance | [] |
authzCache | cachingCache | null | authorization cache instance |
-
<AuthzChecker> cacheAuthzResult(string authzCacheKey, boolean isAuthorized)
Caches the authorization result
Parameter Name Data Type Description authzCacheKey string cache key - <username>-<resource> isAuthorized boolean authorization decision -
<AuthzChecker> check(string username, string[] scopes) returns (boolean)
Performs a authorization check, by comparing the groups of the user and the groups of the scope
Parameter Name Data Type Description username string user name scopes string[] array of scope names Return Variable Data Type Description boolean boolean: true if authorization check is a success, else false -
<AuthzChecker> clearCachedAuthzResult(string authzCacheKey)
Clears any cached authorization result
Parameter Name Data Type Description authzCacheKey string cache key - <username>-<resource> -
<AuthzChecker> getCachedAuthzResult(string authzCacheKey) returns (any)
Retrieves the cached authorization result if any, for the given basic auth header value
Parameter Name Data Type Description authzCacheKey string cache key - <username>-<resource> Return Variable Data Type Description any any: cached entry, or null in a cache miss -
<AuthzChecker> AuthzChecker.<init>()
public function createChecker(PermissionStore permissionstore, cachingCache | null cache) returns (AuthzChecker)
Creates a Basic Authenticator
Parameter Name | Data Type | Description |
---|---|---|
permissionstore | PermissionStore | PermissionStore instance |
cache | cachingCache | null | Cache instance |
Return Variable | Data Type | Description |
---|---|---|
AuthzChecker | AuthzChecker: AuthzChecker instance |