Package de.xima.fc.api.system
Class AuthenticationAPI
java.lang.Object
de.xima.fc.api.ASubAPI
de.xima.fc.api.system.AuthenticationAPI
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetActiveClientDescriptor
(UserContext uc, String clientName) Returns the client descriptor for the given client name.getActiveClientDescriptors
(UserContext uc, Set<String> clientNames) Returns the client descriptors for the given client names.getAuthenticator
(UserContext uc, UUID callbackUuid) Finds all active client descriptors that are configured for the backend in order.Finds all active client descriptors that are configured for the backend and require direct input of creadentials (in order).Finds all active client descriptors that are configured for the backend and redirect the user to an external IDP (in order).getClientDescriptorByProfile
(UserContext uc, String clientName) Returns theclient
for the given client name.org.pac4j.core.profile.UserProfile
getUserProfileByCredentials
(UserContext uc, UUID callbackUuid, String userName, String password) Gets the user profile for the given authenticator.loadAuthenticationData
(UserContext uc, AuthenticationDataRequest request) Methods inherited from class de.xima.fc.api.ASubAPI
getHandlerProvider
-
Constructor Details
-
AuthenticationAPI
public AuthenticationAPI()
-
-
Method Details
-
loadAuthenticationData
-
getAuthenticator
-
getActiveClientDescriptor
Returns the client descriptor for the given client name. The client needs to be active.- Parameters:
uc
- user context for accessing the database.clientName
- name of the client.- Returns:
- the client descriptor for the given client name iff it is active and
null
otherwise. - Since:
- 8.0.0
-
getActiveClientDescriptors
public Map<String,IClientDescriptor> getActiveClientDescriptors(UserContext uc, Set<String> clientNames) Returns the client descriptors for the given client names. The clients need to be active.- Parameters:
uc
- user context for accessing the database.clientNames
- names of the clients.- Returns:
- the client descriptors for the given client names iff they are active as a map. The keys of the map entries are the client names.
- Since:
- 8.0.0
-
getBackendClientDescriptors
Finds all active client descriptors that are configured for the backend in order. Clients with credentials authenticators are at the beginning of the list.- Parameters:
uc
- user context for accessing the database.- Returns:
- ordered list of all client descriptors configured for the backend.
- Since:
- 8.0.0
-
getBackendInputClientDescriptors
Finds all active client descriptors that are configured for the backend and require direct input of creadentials (in order).- Parameters:
uc
- user context for accessing the database.- Returns:
- ordered list of all active client descriptors configured for the backend that require direct input of user credentials.
-
getBackendRedirectClientDescriptors
Finds all active client descriptors that are configured for the backend and redirect the user to an external IDP (in order).- Parameters:
uc
- user context for accessing the database.- Returns:
- ordered list of all active client descriptors configured for the backend and redirect the user to an external IDP.
- Since:
- 8.0.0
-
getClientDescriptorByProfile
Returns theclient
for the given client name.- Parameters:
uc
- user context for accessing the database.clientName
- name of the client (callback UUID or authentication client type nam).- Returns:
- the pac4j client for the given client name or
null
if none could be found. - Since:
- 8.0.0
-
getUserProfileByCredentials
public org.pac4j.core.profile.UserProfile getUserProfileByCredentials(UserContext uc, UUID callbackUuid, String userName, String password) Gets the user profile for the given authenticator. Only allowed for LDAP authenticators at the moment.- Parameters:
uc
- user context for accessing the database.callbackUuid
- callback UUID of the authenticatoruserName
- of the userpassword
- of the user- Returns:
- the pac4j
UserProfile
of the user if the user was successfully validated. - Since:
- 8.0.0
-