public interface IdpAdapterManager
Modifier and Type | Interface and Description |
---|---|
static class |
IdpAdapterManager.ChangeEvent
Encapsulates a change event which occurred to an IdpAdapter in the
IdpAdapterManager |
static class |
IdpAdapterManager.NotFoundException
An
Exception capturing the scenario where an IdP Adapter with a given ID does not exist in the system |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addConfig(IdpAdapterConfig config)
Add a new Identity Provider Adapter
|
WebAuthSession |
createSession(java.lang.String idpId,
com.google.common.collect.ImmutableCollection<java.lang.String> securityZones)
Creates a
WebAuthSession given the targeted IdP Adapter's ID |
java.net.URI |
generateLogoutRequestUri(java.lang.String idpId,
java.net.URI logoutRedirectUri,
WebAuthState.Builder webAuthStateBuilder,
java.lang.String token)
Generates the
URI to redirect the end user for performing logout with an external IdP. |
java.net.URI |
generateWebAuthRequestUri(java.lang.String idpId,
java.net.URI authRedirectUri,
WebAuthState.Builder webAuthStateBuilder)
Generates the
URI to redirect the end user for performing web auth with an external IdP. |
com.google.common.collect.ImmutableCollection<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String>> |
getAll() |
java.util.Optional<IdpAdapterConfig> |
getConfig(java.lang.String id)
Fetch the
IdpAdapterConfig associated with the given IdP ID |
com.google.common.eventbus.EventBus |
getEventBus() |
void |
removeProviderConfig(java.lang.String id)
Remove an Identity Provider Adapter from the system
|
void |
updateProviderConfig(java.lang.String id,
IdpAdapterConfig config)
Update an existing Identity Provider Adapter
|
@Nonnull com.google.common.collect.ImmutableCollection<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String>> getAll()
ImmutableCollection
of all pairs
of Identity Provider Adapter IDs and their
names configured in the system@Nonnull java.util.Optional<IdpAdapterConfig> getConfig(@Nonnull java.lang.String id)
IdpAdapterConfig
associated with the given IdP IDid
- The targeted IdP IDOptional
which contains the IdpAdapterConfig
associated with the given IdP ID
or an empty Optional if there exists no IdP Adapter with the given ID@Nonnull java.lang.String addConfig(@Nonnull IdpAdapterConfig config) throws IdpAdapterManagerException
config
- the configuration of the new IdP AdapterIdpAdapterManagerException
- if there is a problem adding the new configvoid updateProviderConfig(@Nonnull java.lang.String id, @Nonnull IdpAdapterConfig config) throws IdpAdapterManagerException, IdpAdapterManager.NotFoundException
id
- the ID of the IdP Adapter to updateconfig
- the new configuration which will replace the IdP Adapter's current configurationIdpAdapterManagerException
- if there is a problem updating the configIdpAdapterManager.NotFoundException
void removeProviderConfig(@Nonnull java.lang.String id) throws IdpAdapterManagerException, IdpAdapterManager.NotFoundException
id
- the ID of the IdP Adapter to removeIdpAdapterManagerException
- if there is a problem removing the configIdpAdapterManager.NotFoundException
@Nonnull java.net.URI generateWebAuthRequestUri(@Nonnull java.lang.String idpId, @Nonnull java.net.URI authRedirectUri, @Nonnull WebAuthState.Builder webAuthStateBuilder) throws IdpAdapterManagerException
URI
to redirect the end user for performing web auth with an external IdP.idpId
- the targeted IdP Adapter IDauthRedirectUri
- the redirect URI
to the route which will handle the web auth responsewebAuthStateBuilder
- the WebAuthState.Builder
to attach state to be linked from pre- to
post-web-authURI
to redirect the end user for performing web auth with the targeted external IdPIdpAdapterManagerException
- if there is an unexpected problem generating the web auth request URI
@Nonnull java.net.URI generateLogoutRequestUri(@Nonnull java.lang.String idpId, @Nonnull java.net.URI logoutRedirectUri, @Nonnull WebAuthState.Builder webAuthStateBuilder, @Nullable java.lang.String token) throws IdpAdapterManagerException
URI
to redirect the end user for performing logout with an external IdP.idpId
- the targeted IdP Adapter IDlogoutRedirectUri
- the redirect URI
to the route which will handle the logout responsewebAuthStateBuilder
- the WebAuthState.Builder
to attach state to be linked from pre- to post-logouttoken
- the optional token from which authentication was asserted, to be used as a hint for
some implementations to perform logout appropriatelyURI
to redirect the end user for performing logout with the targeted external IdPIdpAdapterManagerException
- if there is an unexpected problem generating the logout request URI
@Nonnull WebAuthSession createSession(@Nullable java.lang.String idpId, @Nonnull com.google.common.collect.ImmutableCollection<java.lang.String> securityZones)
WebAuthSession
given the targeted IdP Adapter's IDidpId
- the targeted IdP Adapter IDsecurityZones
- the security zones of the context in which the WebAuthSession will run@Nonnull com.google.common.eventbus.EventBus getEventBus()
EventBus
where this IdpAdapterManager
publishes change
events