Class RelyingPartyClientInformationProvider
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- net.shibboleth.ext.spring.service.AbstractServiceableComponent<ClientInformationResolver>
-
- org.geant.idpextension.oidc.metadata.resolver.RelyingPartyClientInformationProvider
-
- All Implemented Interfaces:
Comparable<RelyingPartyClientInformationProvider>,net.shibboleth.utilities.java.support.component.Component,net.shibboleth.utilities.java.support.component.DestructableComponent,net.shibboleth.utilities.java.support.component.IdentifiableComponent,net.shibboleth.utilities.java.support.component.IdentifiedComponent,net.shibboleth.utilities.java.support.component.InitializableComponent,net.shibboleth.utilities.java.support.resolver.Resolver<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation,net.shibboleth.utilities.java.support.resolver.CriteriaSet>,net.shibboleth.utilities.java.support.service.ServiceableComponent<ClientInformationResolver>,ClientInformationResolver,RefreshableClientInformationResolver,Aware,ApplicationContextAware
public class RelyingPartyClientInformationProvider extends net.shibboleth.ext.spring.service.AbstractServiceableComponent<ClientInformationResolver> implements RefreshableClientInformationResolver, Comparable<RelyingPartyClientInformationProvider>
This class exists primarily to allow the parsing of relying-party.xml to create a serviceable implementation ofClientInformationResolver. Based on net.shibboleth.idp.saml.metadata.RelyingPartyMetadataProvider.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private ClientInformationResolverresolverThe embedded resolver.private IntegersortKeyThe key by which we sort the provider.private static intsortKeyValueIf we autogenerate a sort key it comes from this count.
-
Constructor Summary
Constructors Constructor Description RelyingPartyClientInformationProvider()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(RelyingPartyClientInformationProvider other)protected voiddoInitialize()booleanequals(Object other).ClientInformationResolvergetComponent()ClientInformationResolvergetEmbeddedResolver()Return what we are build around.InstantgetLastRefresh()Gets the time the last refresh cycle occurred.InstantgetLastUpdate()Get the time that the currently available client information was last updated.inthashCode()voidrefresh()Refresh the data exposed by the resolver.Iterable<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation>resolve(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)com.nimbusds.openid.connect.sdk.rp.OIDCClientInformationresolveSingle(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)voidsetEmbeddedResolver(ClientInformationResolver theResolver)Set theClientInformationResolverto embed.voidsetSortKey(int key)Set the sort key.-
Methods inherited from class net.shibboleth.ext.spring.service.AbstractServiceableComponent
doDestroy, getApplicationContext, pinComponent, setApplicationContext, unloadComponent, unpinComponent
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
sortKeyValue
private static int sortKeyValue
If we autogenerate a sort key it comes from this count.
-
log
private final org.slf4j.Logger log
Class logger.
-
resolver
@NonnullAfterInit private ClientInformationResolver resolver
The embedded resolver.
-
sortKey
@NonnullAfterInit private Integer sortKey
The key by which we sort the provider.
-
-
Method Detail
-
setSortKey
public void setSortKey(int key)
Set the sort key.- Parameters:
key- what to set
-
setEmbeddedResolver
@Nonnull public void setEmbeddedResolver(@Nonnull ClientInformationResolver theResolver)Set theClientInformationResolverto embed.- Parameters:
theResolver- TheClientInformationResolverto embed.
-
getEmbeddedResolver
@Nonnull public ClientInformationResolver getEmbeddedResolver()
Return what we are build around. Used for testing.- Returns:
- the parameter we got as a constructor
-
resolve
@Nonnull public Iterable<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation> resolve(@Nullable net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) throws net.shibboleth.utilities.java.support.resolver.ResolverException
- Specified by:
resolvein interfacenet.shibboleth.utilities.java.support.resolver.Resolver<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation,net.shibboleth.utilities.java.support.resolver.CriteriaSet>- Throws:
net.shibboleth.utilities.java.support.resolver.ResolverException
-
resolveSingle
@Nullable public com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation resolveSingle(@Nullable net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) throws net.shibboleth.utilities.java.support.resolver.ResolverException- Specified by:
resolveSinglein interfacenet.shibboleth.utilities.java.support.resolver.Resolver<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation,net.shibboleth.utilities.java.support.resolver.CriteriaSet>- Throws:
net.shibboleth.utilities.java.support.resolver.ResolverException
-
doInitialize
protected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException- Overrides:
doInitializein classnet.shibboleth.ext.spring.service.AbstractServiceableComponent<ClientInformationResolver>- Throws:
net.shibboleth.utilities.java.support.component.ComponentInitializationException
-
getComponent
@Nonnull public ClientInformationResolver getComponent()
- Specified by:
getComponentin interfacenet.shibboleth.utilities.java.support.service.ServiceableComponent<ClientInformationResolver>- Specified by:
getComponentin classnet.shibboleth.ext.spring.service.AbstractServiceableComponent<ClientInformationResolver>
-
refresh
public void refresh() throws net.shibboleth.utilities.java.support.resolver.ResolverExceptionRefresh the data exposed by the resolver.An implementation of this method should typically be either
synchronizedor make use other locking mechanisms to protect against concurrent access.- Specified by:
refreshin interfaceRefreshableClientInformationResolver- Throws:
net.shibboleth.utilities.java.support.resolver.ResolverException- if the refresh operation was unsuccessful
-
getLastRefresh
public Instant getLastRefresh()
Gets the time the last refresh cycle occurred.- Specified by:
getLastRefreshin interfaceRefreshableClientInformationResolver- Returns:
- time the last refresh cycle occurred
-
getLastUpdate
public Instant getLastUpdate()
Get the time that the currently available client information was last updated. Note, this may be different than the time retrieved byRefreshableClientInformationResolver.getLastRefresh()is the client information was known not to have changed during the last refresh cycle.- Specified by:
getLastUpdatein interfaceRefreshableClientInformationResolver- Returns:
- time when the currently client information was last updated, null if it has never successfully been read in
-
compareTo
public int compareTo(RelyingPartyClientInformationProvider other)
- Specified by:
compareToin interfaceComparable<RelyingPartyClientInformationProvider>
-
equals
public boolean equals(Object other)
. We are within a spring context and so equality can be determined by ID, however we also test by sortKey just in case.
-
-