public class OpenIdResolverServiceImpl extends Object implements OpenIdResolverService
OpenIdResolver
s against their issuer key,
so the appropriate OpenIdResolver
can be looked up.Constructor and Description |
---|
OpenIdResolverServiceImpl(int readTimeout,
int connTimeout)
Constructor for the OpenIdResolverServiceImpl which will use the supplied
read and connection timeouts when communicating over HTTP.
|
Modifier and Type | Method and Description |
---|---|
boolean |
configureResolverWithJWK(String issuer,
URL jwkUrl)
Configures a new Resolver by setting it up to download public keys from the supplied url.
|
boolean |
configureResolverWithKey(String issuer,
String keyAlias,
String keystoreLocation,
String keystoreType,
String keystorePassword)
Configures a new Resolver by finding the appropriate public key in the supplied keystore,
and adds it to the Map of current resolvers.
|
boolean |
configureResolverWithSecret(String issuer,
String sharedSecret)
Configures a new Resolver by finding the appropriate public key in the supplied keystore,
and adds it to the Map of current resolvers.
|
boolean |
configureResolverWithWellKnownOpenIdConfiguration(URL configUrl)
Configures a new Resolver by setting it up to download public keys from the supplied
well-known Open Id Connect URL.
|
Optional<OpenIdResolver> |
getResolverForIssuer(String issuer)
Returns the appropriate resolver for the given issuer - if it exists.
|
public OpenIdResolverServiceImpl(int readTimeout, int connTimeout)
readTimeout
- HTTP read timeout for resolversconnTimeout
- HTTP connection timeout for resolverspublic Optional<OpenIdResolver> getResolverForIssuer(String issuer)
getResolverForIssuer
in interface OpenIdResolverService
issuer
- The name of the issuer of the Open Id Connect token to checkpublic boolean configureResolverWithKey(String issuer, String keyAlias, String keystoreLocation, String keystoreType, String keystorePassword)
configureResolverWithKey
in interface OpenIdResolverService
issuer
- The issuer which provides the Open ID Connect auth tokenkeyAlias
- The alias under which the public key is storedkeystoreLocation
- location of the keystore filekeystoreType
- type of the keystore filekeystorePassword
- password to enter the keystorepublic boolean configureResolverWithSecret(String issuer, String sharedSecret)
configureResolverWithSecret
in interface OpenIdResolverService
issuer
- The issuer which provides the Open ID Connect auth tokensharedSecret
- The known-to-both-parties secret Stringpublic boolean configureResolverWithJWK(String issuer, URL jwkUrl)
configureResolverWithJWK
in interface OpenIdResolverService
issuer
- The issuer which provides the Open ID Connect auth tokenjwkUrl
- location from which to determine which public key to usepublic boolean configureResolverWithWellKnownOpenIdConfiguration(URL configUrl)
configureResolverWithWellKnownOpenIdConfiguration
in interface OpenIdResolverService
configUrl
- location from which to determine which public key to useCopyright © 2010-2018, ForgeRock All Rights Reserved.