Interface ServiceAccountAuthService


public interface ServiceAccountAuthService
Manager to interact with Service Accounts authentication methods.
Since:
7.0.0
  • Method Details

    • getAuthMethods

      Collection<ServiceAccountAuthMethod> getAuthMethods(long serviceAccountId)
      Finds all authentication methods assigned to the service account
      Parameters:
      serviceAccountId - to search for
      Returns:
      the authentication methods assigned to the service account
      Since:
      7.0.0
    • updateAuth

      void updateAuth(ServiceAccount serviceAccount, ServiceAccountAuthMethod authMethod)
      Updates a service account and authentication method
      Parameters:
      serviceAccount - to modify
      authMethod - to modify
      Since:
      7.0.0
    • deleteAuth

      void deleteAuth(ServiceAccount serviceAccount, ServiceAccountAuthMethod authMethod)
      Deletes authentication method assigned to the service account
      Parameters:
      serviceAccount - from which to delete the authentication method
      authMethod - to delete
      Since:
      7.0.0
    • findByAuthMethod

      Optional<ServiceAccount> findByAuthMethod(ServiceAccountAuthMethod authMethod)
      Finds service accounts based on the provided authentication method
      Parameters:
      authMethod - to search for
      Returns:
      the service account if exists, none otherwise
      Since:
      7.0.0
    • findByAuthMethods

      @Nonnull default Map<String,ServiceAccount> findByAuthMethods(@Nullable Set<ServiceAccountAuthMethod> authMethods)
      Fetches all service accounts matching a set of provided auth methods. If null or an empty set is passed in then nothing will be returned.
      Parameters:
      authMethods - Set of auth methods to search for
      Returns:
      Map of auth method IDs to their corresponding service accounts (if found).
      Since:
      7.0.0