public class DefaultSamlObjectResolver extends java.lang.Object implements SamlObjectResolver
Constructor and Description |
---|
DefaultSamlObjectResolver() |
Modifier and Type | Method and Description |
---|---|
IdentityProviderMetadata |
getLocalIdentityProvider(java.lang.String baseUrl)
Returns the Identity Provider metadata for a locally hosted IDP
|
ServiceProviderMetadata |
getLocalServiceProvider(java.lang.String baseUrl)
Returns the Service Provider metadata for a locally hosted SP
|
protected java.util.List<SimpleKey> |
getSimpleKeys(LocalProviderConfiguration sp) |
protected boolean |
isUri(java.lang.String uri) |
protected Metadata |
resolve(java.lang.String metadata,
boolean skipSslValidation) |
IdentityProviderMetadata |
resolveIdentityProvider(Assertion assertion)
Under the assumption that the assertion was sent by an external identity provider
to a local service provider, resolve the configured identity provider
|
IdentityProviderMetadata |
resolveIdentityProvider(ExternalProviderConfiguration idp)
Based on the external configuration of an Identity Provider resolve the metadata for that provider.
|
IdentityProviderMetadata |
resolveIdentityProvider(LogoutRequest logoutRequest)
Under the assumption that the logout request was sent by an external identity provider
to a local service provider, resolve the configured identity provider
|
IdentityProviderMetadata |
resolveIdentityProvider(Response response)
Under the assumption that the Response originated from an Identity Provider
resolve the configured IDP using the response message
|
IdentityProviderMetadata |
resolveIdentityProvider(java.lang.String entityId)
Given a known entityId resolve a configured identity provider
|
ServiceProviderMetadata |
resolveServiceProvider(Assertion localAssertion)
For the local identity provider, resolve the external service provider
that the assertion was sent to.
|
ServiceProviderMetadata |
resolveServiceProvider(AuthenticationRequest request)
Under the assumption that the authentication request was sent from
a service provider to the local identity provider, resolve the
configured external service provider's metadata
|
ServiceProviderMetadata |
resolveServiceProvider(ExternalProviderConfiguration sp)
Based on the external configuration of a Service Provider resolve the metadata for that provider.
|
ServiceProviderMetadata |
resolveServiceProvider(LogoutRequest logoutRequest)
Under the assumption that the logout request was sent by an external service provider
to a local identity provider, resolve the configured service provider
|
ServiceProviderMetadata |
resolveServiceProvider(java.lang.String entityId)
Given a known entityId resolve a configured service provider
|
DefaultSamlObjectResolver |
setMetadataCache(DefaultMetadataCache cache) |
DefaultSamlObjectResolver |
setNetwork(Network network) |
DefaultSamlObjectResolver |
setSamlDefaults(SamlDefaults samlDefaults) |
DefaultSamlObjectResolver |
setSamlServerConfiguration(SamlServerConfiguration configuration) |
DefaultSamlObjectResolver |
setTransformer(SamlTransformer transformer) |
protected <T extends Metadata> |
throwIfNull(T metadata,
java.lang.String key,
java.lang.String value) |
@Autowired public DefaultSamlObjectResolver setTransformer(SamlTransformer transformer)
@Autowired public DefaultSamlObjectResolver setSamlServerConfiguration(SamlServerConfiguration configuration)
@Autowired public DefaultSamlObjectResolver setSamlDefaults(SamlDefaults samlDefaults)
@Autowired public DefaultSamlObjectResolver setNetwork(Network network)
@Autowired public DefaultSamlObjectResolver setMetadataCache(DefaultMetadataCache cache)
public ServiceProviderMetadata getLocalServiceProvider(java.lang.String baseUrl)
SamlObjectResolver
getLocalServiceProvider
in interface SamlObjectResolver
baseUrl
- the base URL that the SP is hosted at.
This parameter is used to configure URLs in
in the metadata data.public IdentityProviderMetadata getLocalIdentityProvider(java.lang.String baseUrl)
SamlObjectResolver
getLocalIdentityProvider
in interface SamlObjectResolver
baseUrl
- the base URL that the SP is hosted at.
This parameter is used to configure URLs in
in the metadata data.protected <T extends Metadata> T throwIfNull(T metadata, java.lang.String key, java.lang.String value)
public IdentityProviderMetadata resolveIdentityProvider(Assertion assertion)
SamlObjectResolver
resolveIdentityProvider
in interface SamlObjectResolver
assertion
- the assertion request sent by the IDP and received by the local SPpublic IdentityProviderMetadata resolveIdentityProvider(Response response)
SamlObjectResolver
resolveIdentityProvider
in interface SamlObjectResolver
response
- a SAML response message received by a Service Providerpublic IdentityProviderMetadata resolveIdentityProvider(java.lang.String entityId)
SamlObjectResolver
resolveIdentityProvider
in interface SamlObjectResolver
entityId
- entityId of identity providerpublic IdentityProviderMetadata resolveIdentityProvider(LogoutRequest logoutRequest)
SamlObjectResolver
resolveIdentityProvider
in interface SamlObjectResolver
logoutRequest
- the logout request sent by the IDP and received by local SPpublic IdentityProviderMetadata resolveIdentityProvider(ExternalProviderConfiguration idp)
SamlObjectResolver
resolveIdentityProvider
in interface SamlObjectResolver
idp
- Identity Provider configurationpublic ServiceProviderMetadata resolveServiceProvider(java.lang.String entityId)
SamlObjectResolver
resolveServiceProvider
in interface SamlObjectResolver
entityId
- entityId of service providerpublic ServiceProviderMetadata resolveServiceProvider(AuthenticationRequest request)
SamlObjectResolver
resolveServiceProvider
in interface SamlObjectResolver
request
- the request that was received by the local identity providerpublic ServiceProviderMetadata resolveServiceProvider(ExternalProviderConfiguration sp)
SamlObjectResolver
resolveServiceProvider
in interface SamlObjectResolver
sp
- Service Provider configurationpublic ServiceProviderMetadata resolveServiceProvider(LogoutRequest logoutRequest)
SamlObjectResolver
resolveServiceProvider
in interface SamlObjectResolver
logoutRequest
- the logout request sent by the SPpublic ServiceProviderMetadata resolveServiceProvider(Assertion localAssertion)
SamlObjectResolver
resolveServiceProvider
in interface SamlObjectResolver
localAssertion
- the assertion that the local IDP issuedprotected Metadata resolve(java.lang.String metadata, boolean skipSslValidation)
protected boolean isUri(java.lang.String uri)
protected java.util.List<SimpleKey> getSimpleKeys(LocalProviderConfiguration sp)