Package io.gravitee.am.service.impl
Class PasswordPolicyServiceImpl
java.lang.Object
io.gravitee.am.service.impl.PasswordPolicyServiceImpl
- All Implemented Interfaces:
PasswordPolicyService
- Author:
- Eric LELEU (eric.leleu at graviteesource.com), Rafal PODLES (rafal.podles at graviteesource.com), GraviteeSource Team
-
Constructor Summary
Constructors -
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)
-
Constructor Details
-
PasswordPolicyServiceImpl
public PasswordPolicyServiceImpl()
-
-
Method Details
-
findByDomain
Description copied from interface:PasswordPolicyServiceGet all password policies by domain- Specified by:
findByDomainin interfacePasswordPolicyService- Parameters:
domain- the domain- Returns:
- list of PasswordPolicy
-
create
public io.reactivex.rxjava3.core.Single<PasswordPolicy> create(PasswordPolicy policy, User principal) Description copied from interface:PasswordPolicyServiceCreate a new password policy linked to the reference entity (domain for example)- Specified by:
createin interfacePasswordPolicyService- Parameters:
policy- the new password policyprincipal- the user performing the action- Returns:
- PasswordPolicy
-
findByReferenceAndId
public io.reactivex.rxjava3.core.Maybe<PasswordPolicy> findByReferenceAndId(ReferenceType referenceType, String referenceId, String policyId) Description copied from interface:PasswordPolicyServiceRetrieve a password policy by its reference type, reference ID, and policy ID.- Specified by:
findByReferenceAndIdin interfacePasswordPolicyService- 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
-
update
public io.reactivex.rxjava3.core.Single<PasswordPolicy> update(ReferenceType referenceType, String referenceId, String policyId, UpdatePasswordPolicy policy, User principal) Description copied from interface:PasswordPolicyServiceUpdate a password policy linked to the reference entity (domain for example)- Specified by:
updatein interfacePasswordPolicyService- 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
-
deleteAndUpdateIdp
public io.reactivex.rxjava3.core.Completable deleteAndUpdateIdp(ReferenceType referenceType, String referenceId, String policyId, User principal) Description copied from interface:PasswordPolicyServiceDelete the password policy and reset the policyId for each IDP linked to it- Specified by:
deleteAndUpdateIdpin interfacePasswordPolicyService- 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
-
setDefaultPasswordPolicy
public io.reactivex.rxjava3.core.Single<PasswordPolicy> setDefaultPasswordPolicy(ReferenceType referenceType, String referenceId, String policyId, User principal) Description copied from interface:PasswordPolicyServiceSet a password policy as the default policy for a reference entity (e.g., domain).- Specified by:
setDefaultPasswordPolicyin interfacePasswordPolicyService- 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
-
deleteByReference
public io.reactivex.rxjava3.core.Completable deleteByReference(ReferenceType referenceType, String referenceId) Description copied from interface:PasswordPolicyServiceDelete password policies by the reference- Specified by:
deleteByReferencein interfacePasswordPolicyService- Parameters:
referenceType- the type of reference (e.g., DOMAIN)referenceId- the identifier of the reference- Returns:
- a Completable
-
retrievePasswordPolicy
public io.reactivex.rxjava3.core.Maybe<PasswordPolicy> retrievePasswordPolicy(User user, PasswordSettingsAware passwordSettingsAware, IdentityProvider provider) Description copied from interface:PasswordPolicyServiceRetrieve the password policy associated with a user, based on the user's password settings awareness.- Specified by:
retrievePasswordPolicyin interfacePasswordPolicyService- 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
-