InMemoryAuthorizationProvider class
In-memory authorization provider for testing and development
- Implemented types
Constructors
Properties
Methods
-
checkPermissions(
String userId, List< String> permissions, {String? resource, Map<String, dynamic> ? context}) → Future<Map< String, bool> > -
Batch check multiple permissions
override
-
checkRoles(
String userId, List< String> roles, {String? resource, Map<String, dynamic> ? context}) → Future<Map< String, bool> > -
Batch check multiple roles
override
-
clear(
) → void - Clear all user data
-
getAuthorization(
String userId, {String? resource, String? action, Map< String, dynamic> ? context}) → Future<AuthorizationData> -
Get user's current authorization data
override
-
getEffectivePermissions(
String userId, String resource) → Future< List< String> > -
Get user's effective permissions for a resource
override
-
getEffectiveRoles(
String userId, String resource) → Future< List< String> > -
Get user's effective roles for a resource
override
-
hasAllPermissions(
String userId, List< String> permissions, {String? resource, Map<String, dynamic> ? context}) → Future<bool> -
Check if user has all of the specified permissions
override
-
hasAllRoles(
String userId, List< String> roles, {String? resource, Map<String, dynamic> ? context}) → Future<bool> -
Check if user has all of the specified roles
override
-
hasAnyPermission(
String userId, List< String> permissions, {String? resource, Map<String, dynamic> ? context}) → Future<bool> -
Check if user has any of the specified permissions
override
-
hasAnyRole(
String userId, List< String> roles, {String? resource, Map<String, dynamic> ? context}) → Future<bool> -
Check if user has any of the specified roles
override
-
hasPermission(
String userId, String permission, {String? resource, Map< String, dynamic> ? context}) → Future<bool> -
Check if user has specific permission
override
-
hasRole(
String userId, String role, {String? resource, Map< String, dynamic> ? context}) → Future<bool> -
Check if user has specific role
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeUserData(
String userId) → void - Remove authorization data for a user
-
setUserData(
String userId, AuthorizationData data) → void - Add or update authorization data for a user
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited