RBAC

interface RBAC

The RBAC interface provides methods for checking a user's permissions according to the roles defined in the Stytch Dashboard

Functions

Link copied to clipboard
abstract suspend fun allPermissions(): Map<String, Map<String, Boolean>>
abstract fun allPermissions(callback: (Map<String, Map<String, Boolean>>) -> Unit)

Evaluates all permissions granted to the logged-in member. Returns a Map> response indicating the member's permissions. Each boolean will be true if the member can perform the action, false otherwise.

Link copied to clipboard

Evaluates all permissions granted to the logged-in member. Returns a Map> response indicating the member's permissions. Each boolean will be true if the member can perform the action, false otherwise.

Link copied to clipboard
abstract suspend fun isAuthorized(resourceId: String, action: String): Boolean
abstract fun isAuthorized(resourceId: String, action: String, callback: (Boolean) -> Unit)

Determines whether the logged-in member is allowed to perform the specified action on the specified resource. Returns true if the member can perform the action, false otherwise.

Link copied to clipboard
abstract fun isAuthorizedCompletable(resourceId: String, action: String): CompletableFuture<Boolean>

Determines whether the logged-in member is allowed to perform the specified action on the specified resource. Returns true if the member can perform the action, false otherwise.

Link copied to clipboard
abstract fun isAuthorizedSync(resourceId: String, action: String): Boolean

Determines whether the logged-in member is allowed to perform the specified action on the specified resource. Returns true if the member can perform the action, false otherwise.