Package de.xima.fc.mdl.auth
Class DefaultAuthenticatorClients
- java.lang.Object
-
- de.xima.fc.mdl.auth.DefaultAuthenticatorClients
-
- All Implemented Interfaces:
IAuthenticatorClients
public class DefaultAuthenticatorClients extends Object implements IAuthenticatorClients
Default implementation for accessing the clients of an authenticator depending on the authentication flow.- Since:
- 7.2.0
- Author:
- XIMA Media GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultAuthenticatorClients.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
autoExecuteIndirectClient()
Determines whether or not the providedindirect client
should be executed automatically iff there is only one authenticator configured for access to a protected resource (e.g.Collection<org.pac4j.core.client.Client>
getAllClients()
IClientDescriptor
getClientDescriptor()
Returns the descriptor for these client.Collection<org.pac4j.core.client.Client>
getClients(EAuthenticationFlow authFlow)
Gets all clients for the given authentication flow.Collection<org.pac4j.core.client.Client>
getDirectClients()
Returns the direct clients of this authenticator configuration.org.pac4j.core.client.Client
getIndirectClient()
Returns the indirect client of this authenticator configuration.static DefaultAuthenticatorClients.Builder
newBuilder(IClientDescriptor clientDescriptor)
-
-
-
Method Detail
-
newBuilder
public static DefaultAuthenticatorClients.Builder newBuilder(IClientDescriptor clientDescriptor)
- Returns:
- a new builder for
DefaultAuthenticatorClients
.
-
getClientDescriptor
public IClientDescriptor getClientDescriptor()
Description copied from interface:IAuthenticatorClients
Returns the descriptor for these client.- Specified by:
getClientDescriptor
in interfaceIAuthenticatorClients
- Returns:
- the descriptor for these clients.
-
getDirectClients
public Collection<org.pac4j.core.client.Client> getDirectClients()
Description copied from interface:IAuthenticatorClients
Returns the direct clients of this authenticator configuration.- Specified by:
getDirectClients
in interfaceIAuthenticatorClients
- Returns:
- a collection of all direct clients of this authenticator configuration.
-
getIndirectClient
public org.pac4j.core.client.Client getIndirectClient()
Description copied from interface:IAuthenticatorClients
Returns the indirect client of this authenticator configuration.- Specified by:
getIndirectClient
in interfaceIAuthenticatorClients
- Returns:
- the indirect client of this authenticator configuration if it exists and
null
otherwise.
-
getAllClients
public Collection<org.pac4j.core.client.Client> getAllClients()
- Specified by:
getAllClients
in interfaceIAuthenticatorClients
- Returns:
- A collection of all clients regardless of authentication flow.
-
getClients
public Collection<org.pac4j.core.client.Client> getClients(EAuthenticationFlow authFlow)
Description copied from interface:IAuthenticatorClients
Gets all clients for the given authentication flow.- Specified by:
getClients
in interfaceIAuthenticatorClients
- Parameters:
authFlow
- authentication flow for which a clients are requested.- Returns:
- A collection of clients for the given authentication flow.
-
autoExecuteIndirectClient
public boolean autoExecuteIndirectClient()
Description copied from interface:IAuthenticatorClients
Determines whether or not the providedindirect client
should be executed automatically iff there is only one authenticator configured for access to a protected resource (e.g. form, backend). Automatic execution of the client will result in immediate redirection to the IDP defined by the client when accessing the protected resource.- Specified by:
autoExecuteIndirectClient
in interfaceIAuthenticatorClients
- Returns:
true
if the provided indirect client should be automatically executed andfalse
otherwise.
-
-