Class IssuerRepository
java.lang.Object
org.forgerock.openig.filter.oauth2.client.IssuerRepository
A repository to store and create all the OAuth2 issuers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionPromise<? extends Issuer,DiscoveryException> findByName(String issuerName) Find a registeredIssuerwhose name matches issuerName.Promise<? extends Issuer,DiscoveryException> findBySupportedDomainNames(String givenDomainName) Find a registeredIssuerthat supports the given {code domainName}.Promise<? extends Issuer,DiscoveryException> registerAsync(String issuerName, List<Pattern> supportedDomains, Supplier<Promise<? extends Issuer, DiscoveryException>> supplier) Tries to find an already registered Issuer named issuerName.
-
Method Details
-
findByName
Find a registeredIssuerwhose name matches issuerName.- Parameters:
issuerName- the name of theIssuerto find- Returns:
- the issuer matching the given issuerName or null if none found.
-
findBySupportedDomainNames
public Promise<? extends Issuer,DiscoveryException> findBySupportedDomainNames(String givenDomainName) Find a registeredIssuerthat supports the given {code domainName}. The given domain name can match one or none domain names supported by Issuers declared in this route. If the given domain name matches the patterns given by an Issuer 'supportedDomains' attributes, then the corresponding Issuer is returned to be used.- Parameters:
givenDomainName- The domain name to match from the registered domain names.- Returns:
- A promise completed with either an OAuth 2.0 issuer on success or a
DiscoveryExceptionon failure
-
registerAsync
public Promise<? extends Issuer,DiscoveryException> registerAsync(String issuerName, List<Pattern> supportedDomains, Supplier<Promise<? extends Issuer, DiscoveryException>> supplier) Tries to find an already registered Issuer named issuerName. If none is found, then build a new Issuer based on its async supplier. Furthermore, this Issuer will be associated to the provided domain names.- Parameters:
issuerName- The issuer's identifier. Usually, it's the host name or a given name.supportedDomains- List of the supported domains for this issuer.supplier- The Async supplier of an issuer. Will only be called if the issuer is not already registered- Returns:
- A promise completed with either an OAuth 2.0 issuer on success or a
DiscoveryExceptionon failure
-