public class IssuerRepository extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IssuerRepository.Heaplet
Creates and initializes an
IssuerRepository in a heap environment. |
Constructor and Description |
---|
IssuerRepository(Handler defaultIssuerHandler)
Creates an IssuerRepository.
|
Modifier and Type | Method and Description |
---|---|
Promise<Issuer,DiscoveryException> |
findByName(String issuerName)
Find a registered
Issuer whose name matches issuerName. |
Promise<Issuer,DiscoveryException> |
findBySupportedDomainNames(String givenDomainName)
Find a registered
Issuer that supports the given {code domainName}. |
Promise<Issuer,DiscoveryException> |
findOrCreateFromWellKnownUri(String issuerName,
URI wellKnownUri)
Try to find an already registered Issuer named issuerName.
|
Promise<Issuer,DiscoveryException> |
findOrCreateFromWellKnownUri(String issuerName,
URI wellKnownUri,
List<Pattern> supportedDomains,
Handler handler)
Tries to find an already registered Issuer named issuerName.
|
Promise<Issuer,DiscoveryException> |
register(String issuerName,
JsonValue config,
List<Pattern> supportedDomains)
Register an
Issuer into the repository. |
public IssuerRepository(Handler defaultIssuerHandler)
defaultIssuerHandler
- The default handler to use to fetch issuer's data from well-known endpoint.public Promise<Issuer,DiscoveryException> findByName(String issuerName)
Issuer
whose name matches issuerName.issuerName
- the name of the Issuer
to findpublic Promise<Issuer,DiscoveryException> findBySupportedDomainNames(String givenDomainName)
Issuer
that 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.givenDomainName
- The domain name to match from the registered domain names.DiscoveryException
on failurepublic Promise<Issuer,DiscoveryException> register(String issuerName, JsonValue config, List<Pattern> supportedDomains)
Issuer
into the repository.issuerName
- The issuer's identifier. Usually, it's the host name or a given name.config
- The configuration of the issuer.supportedDomains
- List of the supported domains for this issuer.DiscoveryException
on failurepublic Promise<Issuer,DiscoveryException> findOrCreateFromWellKnownUri(String issuerName, URI wellKnownUri)
Issuer
based on the given well-known URI.issuerName
- The issuer's identifier. Usually, it's the host name or a given name.wellKnownUri
- The well-known URI of this issuer.DiscoveryException
on failurepublic Promise<Issuer,DiscoveryException> findOrCreateFromWellKnownUri(String issuerName, URI wellKnownUri, List<Pattern> supportedDomains, Handler handler)
issuerName
- The issuer's identifier. Usually, it's the host name or a given name.wellKnownUri
- The well-known URI of this issuer.supportedDomains
- List of the supported domains for this issuer.handler
- The issuer handler that does the call to the given well-known
URI.DiscoveryException
on failureCopyright 2011-2017 ForgeRock AS.