SecurityController class
- Inheritance
-
- Object
- KuzzleController
- SecurityController
Constructors
- SecurityController(Kuzzle kuzzle)
Properties
Methods
-
checkRights(
String kuid, Map< String, dynamic> requestPayload) → Future<bool> - Checks if an API action can be executed by the current user.
-
createApiKey(
String userId, String description, {String? expiresIn, bool? refresh}) → Future< Map< String, dynamic> > - Creates a new API key for a user.
-
createCredentials(
String strategy, String id, Map< String, dynamic> credentials, {bool? refresh}) → Future<Map< String, dynamic> > - Creates authentication credentials for a user.
-
createFirstAdmin(
String id, Map< String, dynamic> body, {bool? reset}) → Future<KuzzleUser> - Creates a Kuzzle administrator account, only if none exist.
-
createOrReplaceProfile(
String id, List< Map< policies, {bool? waitForRefresh}) → Future<String, dynamic> >KuzzleProfile> - Creates a new profile or, if the provided profile identifier already exists, replaces it.
-
createOrReplaceRole(
String id, Map< String, dynamic> controllers, {bool? waitForRefresh, bool? force}) → Future<KuzzleRole> - Creates a new role or, if the provided role identifier already exists, replaces it.
-
createProfile(
String id, List< Map< policies, {bool? waitForRefresh}) → Future<String, dynamic> >KuzzleProfile> - Creates a new profile.
-
createRestrictedUser(
Map< String, dynamic> body, String id, {bool? waitForRefresh}) → Future<KuzzleUser> - Creates a new user in Kuzzle, with a preset list of security profiles.
-
createRole(
String id, Map< String, dynamic> controllers, {bool? waitForRefresh, bool? force}) → Future<KuzzleRole> - Creates a new role.
-
createUser(
String id, Map< String, dynamic> body, {bool? waitForRefresh}) → Future<KuzzleUser> - Creates a new user
-
deleteApiKey(
String userId, String id, {bool? waitForRefresh}) → Future< void> - Deletes user API key.
-
deleteCredentials(
String strategy, String id, {bool? waitForRefresh}) → Future< Map< String, dynamic> > - Deletes user credentials for the specified authentication strategy.
-
deleteProfile(
String id, {bool? waitForRefresh}) → Future< Map< String, dynamic> > - Deletes a security profile. An error is returned if the profile is still in use.
-
deleteRole(
String id, {bool? waitForRefresh}) → Future< Map< String, dynamic> > - Deletes a security role. An error is returned if the role is still in use.
-
deleteUser(
String id, {bool? waitForRefresh}) → Future< Map< String, dynamic> > - Deletes a user and all their associate credentials.
-
getAllCredentialFields(
) → Future< Map< String, dynamic> > - Retrieves the list of fields accepted by authentication strategies.
-
getCredentialFields(
String strategy) → Future< List> - Retrieves the list of accepted field names by the specified authentication strategy.
-
getCredentials(
String strategy, String id) → Future< Map< String, dynamic> > - Gets a user's credential information for the specified authentication strategy.
-
getCredentialsById(
String strategy, String id) → Future< Map< String, dynamic> > - Gets credential information for the user identified by the strategy's unique user identifier userId
-
getProfile(
String id) → Future< KuzzleProfile> - Gets a security profile.
-
getProfileMapping(
) → Future< Map< String, dynamic> > - Gets the mapping of the internal security profiles collection.
-
getProfileRights(
String id) → Future< List> - Gets the detailed rights configured by a security profile.
-
getRole(
String id) → Future< KuzzleRole> - Gets a security role.
-
getRoleMapping(
) → Future< Map< String, dynamic> > - Gets the mapping of the internal security role collection.
-
getUser(
String id) → Future< KuzzleUser> - Gets a security role.
-
getUserMapping(
) → Future< Map< String, dynamic> > - Gets the mapping of the internal security user collection.
-
getUserRights(
String id) → Future< List> - Gets the detailed rights granted to a user.
-
hasCredentials(
String strategy, String id) → Future< bool> - Checks if a user has credentials registered for the specified authentication strategy.
-
mDeleteProfiles(
List< String> ids, {bool? waitForRefresh}) → Future<List> - Deletes multiple security profiles.
-
mDeleteRoles(
List< String> ids, {bool? waitForRefresh}) → Future<List> - Deletes multiple security roles.
-
mDeleteUsers(
List< String> ids, {bool? waitForRefresh}) → Future<List> - Deletes multiple security users.
-
mGetProfiles(
List< String> ids) → Future<List< KuzzleProfile> > - Gets multiple security profiles.
-
mGetRoles(
List< String?> ids) → Future<List< KuzzleRole> > - Gets multiple security roles.
-
mGetUsers(
List< String> ids, {String? verb}) → Future<List< KuzzleUser> > - Gets multiple security roles.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
String collection) → Future< bool> - Forces an immediate reindexation of the provided security collection.
-
replaceUser(
String id, Map< String, dynamic> body, {bool? waitForRefresh}) → Future<KuzzleUser> - Replaces a user with new configuration.
-
searchApiKeys(
String userId, Map< String, dynamic> query, {int? from, int? size, String? lang}) → Future<SearchResult> - Searches for a user API keys.
-
searchProfiles(
{Map< String, dynamic> query = const {}, int? from, int? size, String? scroll}) → Future<ProfileSearchResult> - Searches security profiles, optionally returning only those linked to the provided list of security roles.
-
searchRoles(
{Map< String, dynamic> query = const {}, int? from, int? size}) → Future<RoleSearchResult> - Searches security roles, optionally returning only those allowing access to the provided controllers.
-
searchUsers(
{Map< String, dynamic> query = const {}, int? from, int? size, String? scroll, String? lang}) → Future<UserSearchResult> - Searches security profiles, optionally returning only those linked to the provided list of security roles.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateCredentials(
String strategy, String id, Map< String, dynamic> credentials, {bool? waitForRefresh}) → Future<Map< String, dynamic> > - Updates a user credentials for the specified authentication strategy.
-
updateProfile(
String id, List policies, {bool? waitForRefresh}) → Future< KuzzleProfile> - Updates a security profile definition.
-
updateProfileMapping(
Map< String, dynamic> mapping) → Future<Map< String, dynamic> > - Updates the internal profile storage mapping.
-
updateRole(
String id, Map< String, dynamic> body, {bool? waitForRefresh, bool? force}) → Future<KuzzleRole> - Updates a security role definition
-
updateRoleMapping(
Map< String, dynamic> mapping) → Future<Map< String, dynamic> > - Updates the internal role storage mapping.
-
updateUser(
String id, Map< String, dynamic> body, {bool? waitForRefresh}) → Future<KuzzleUser> - Updates a user definition.
-
updateUserMapping(
Map< String, dynamic> mapping) → Future<Map< String, dynamic> > - Updates the internal user storage mapping.
-
validateCredentials(
String strategy, String id, Map< String, dynamic> credentials) → Future<bool> - Checks if the provided credentials are well-formed. Does not actually save credentials.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited