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 Details

    • findByDomain

      io.reactivex.rxjava3.core.Flowable<PasswordPolicy> findByDomain(String domain)
      Get all password policies by domain
      Parameters:
      domain - the domain
      Returns:
      list of PasswordPolicy
    • create

      io.reactivex.rxjava3.core.Single<PasswordPolicy> create(PasswordPolicy policy, User principal)
      Create a new password policy linked to the reference entity (domain for example)
      Parameters:
      policy - the new password policy
      principal - 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 reference
      referenceId - the identifier of the reference
      policyId - the policy id to update
      policy - the new policy settings
      principal - 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 reference
      policyId - 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 reference
      policyId - the ID of the password policy to set as default
      principal - 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 policy
      passwordSettingsAware - the object that is aware of the password settings
      provider - 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 reference
      policyId - the ID of the password policy to set as default
      principal - the principal user performing the operation
      Returns:
      a Single emitting the updated PasswordPolicy that has been set as default