Package io.gravitee.am.service
Interface PasswordPolicyService
- All Known Implementing Classes:
PasswordPolicyServiceImpl
public interface PasswordPolicyService
- Author:
- Eric LELEU (eric.leleu at graviteesource.com), Rafal PODLES (rafal.podles at graviteesource.com), GraviteeSource Team
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<PasswordPolicy>create(PasswordPolicy policy, User principal) Create a new password policy linked to the reference entity (domain for example)io.reactivex.rxjava3.core.CompletabledeleteAndUpdateIdp(ReferenceType referenceType, String referenceId, String policyId, User principal) Delete the password policy and reset the policyId for each IDP linked to itio.reactivex.rxjava3.core.CompletabledeleteByReference(ReferenceType referenceType, String referenceId) Delete password policies by the referenceio.reactivex.rxjava3.core.Flowable<PasswordPolicy>findByDomain(String domain) Get all password policies by domainio.reactivex.rxjava3.core.Maybe<PasswordPolicy>findByReferenceAndId(ReferenceType referenceType, String referenceId, String policyId) Retrieve a password policy by its reference type, reference ID, and policy ID.io.reactivex.rxjava3.core.Maybe<PasswordPolicy>retrievePasswordPolicy(User user, PasswordSettingsAware passwordSettingsAware, IdentityProvider provider) Retrieve the password policy associated with a user, based on the user's password settings awareness.io.reactivex.rxjava3.core.Single<PasswordPolicy>setDefaultPasswordPolicy(ReferenceType referenceType, String referenceId, String policyId, User principal) Set a password policy as the default policy for a reference entity (e.g., domain).io.reactivex.rxjava3.core.Single<PasswordPolicy>update(ReferenceType referenceType, String referenceId, String policyId, UpdatePasswordPolicy policy, User principal) Update a password policy linked to the reference entity (domain for example)
-
Method Details
-
findByDomain
Get all password policies by domain- Parameters:
domain- the domain- Returns:
- list of PasswordPolicy
-
create
Create a new password policy linked to the reference entity (domain for example)- Parameters:
policy- the new password policyprincipal- the user performing the action- Returns:
- PasswordPolicy
-
update
io.reactivex.rxjava3.core.Single<PasswordPolicy> update(ReferenceType referenceType, String referenceId, String policyId, UpdatePasswordPolicy policy, User principal) Update a password policy linked to the reference entity (domain for example)- Parameters:
referenceType- the type of referencereferenceId- the identifier of the referencepolicyId- the policy id to updatepolicy- the new policy settingsprincipal- the user- Returns:
- Password Policy
-
findByReferenceAndId
io.reactivex.rxjava3.core.Maybe<PasswordPolicy> findByReferenceAndId(ReferenceType referenceType, String referenceId, String policyId) Retrieve a password policy by its reference type, reference ID, and policy ID.- Parameters:
referenceType- the type of reference (e.g., DOMAIN)referenceId- the identifier of the referencepolicyId- the ID of the password policy to retrieve- Returns:
- a Maybe emitting the retrieved PasswordPolicy, if found; otherwise, completes
-
deleteAndUpdateIdp
io.reactivex.rxjava3.core.Completable deleteAndUpdateIdp(ReferenceType referenceType, String referenceId, String policyId, User principal) Delete the password policy and reset the policyId for each IDP linked to it- Parameters:
referenceType- the type of reference (e.g., DOMAIN)referenceId- the identifier of the referencepolicyId- the ID of the password policy to set as defaultprincipal- the principal user performing the operation- Returns:
- a Completable
-
deleteByReference
io.reactivex.rxjava3.core.Completable deleteByReference(ReferenceType referenceType, String referenceId) Delete password policies by the reference- Parameters:
referenceType- the type of reference (e.g., DOMAIN)referenceId- the identifier of the reference- Returns:
- a Completable
-
retrievePasswordPolicy
io.reactivex.rxjava3.core.Maybe<PasswordPolicy> retrievePasswordPolicy(User user, PasswordSettingsAware passwordSettingsAware, IdentityProvider provider) Retrieve the password policy associated with a user, based on the user's password settings awareness.- Parameters:
user- the user for whom to retrieve the password policypasswordSettingsAware- the object that is aware of the password settingsprovider- the identity provider- Returns:
- a Maybe emitting the retrieved PasswordPolicy, if found; otherwise, completes
-
setDefaultPasswordPolicy
io.reactivex.rxjava3.core.Single<PasswordPolicy> setDefaultPasswordPolicy(ReferenceType referenceType, String referenceId, String policyId, User principal) Set a password policy as the default policy for a reference entity (e.g., domain).- Parameters:
referenceType- the type of reference (e.g., DOMAIN)referenceId- the identifier of the referencepolicyId- the ID of the password policy to set as defaultprincipal- the principal user performing the operation- Returns:
- a Single emitting the updated PasswordPolicy that has been set as default
-