Class SharedSecretOpenIdResolverImpl

java.lang.Object
org.forgerock.oauth.resolvers.BaseOpenIdResolver
org.forgerock.oauth.resolvers.SharedSecretOpenIdResolverImpl
All Implemented Interfaces:
GenericOpenIdResolver<SignedJwt>, OpenIdResolver

public class SharedSecretOpenIdResolverImpl extends BaseOpenIdResolver
This class exists to allow functionality for those Open ID Connect providers which supply their signatures through symmetric key algorithms (e.g. HMAC). In these cases we want to use the shared secret (known to both the provider and client) such that we can generate a "private key". We do this using the SecretKeySpec call in verifySignature(org.forgerock.json.jose.jws.SignedJwt).
  • Constructor Details

    • SharedSecretOpenIdResolverImpl

      public SharedSecretOpenIdResolverImpl(String issuer, String sharedSecret)
      Constructor for SharedSecretOpenIdResolverImpl. Uses IssuerComparators.DEFAULT for comparing issuer values by exact string comparison.
      Parameters:
      issuer - The issuer (provider) of the Open Id Connect id token
      sharedSecret - The secret String, known to both provider and consumer
      Throws:
      IllegalArgumentException - if the sharedSecret is null
    • SharedSecretOpenIdResolverImpl

      public SharedSecretOpenIdResolverImpl(BiPredicate<String,String> issuerComparator, String issuer, String sharedSecret)
      Constructor for SharedSecretOpenIdResolverImpl.
      Parameters:
      issuerComparator - The comparator for comparing the incoming issuer value against the expected value.
      issuer - The issuer (provider) of the Open Id Connect id token
      sharedSecret - The secret String, known to both provider and consumer
      Throws:
      IllegalArgumentException - if the sharedSecret is null
  • Method Details