Class DefaultProviderResolver

java.lang.Object
io.micronaut.security.oauth2.DefaultProviderResolver
All Implemented Interfaces:
ProviderResolver

@Singleton public class DefaultProviderResolver extends Object implements ProviderResolver
Default implementation of ProviderResolver.
Since:
1.2.0
Author:
James Kleeh
  • Constructor Details

  • Method Details

    • resolveProvider

      public Optional<String> resolveProvider(Authentication authentication)
      Description copied from interface: ProviderResolver
      Resolves the provider.
      Specified by:
      resolveProvider in interface ProviderResolver
      Parameters:
      authentication - The authentication
      Returns:
      An optional provider name
    • openIdClientNameWhichMatchesIssClaim

      protected Optional<String> openIdClientNameWhichMatchesIssClaim(Authentication authentication)
      Parameters:
      authentication - State of authentication
      Returns:
      Optional#empty() if iss claim not found, or if the iss claim does not match the issuer of any open id client. If it matches, the open id client is returned wrapped in an optional
    • openIdClientNameWhichMatchesIssuer

      @NonNull protected @NonNull Optional<String> openIdClientNameWhichMatchesIssuer(@NonNull @NonNull String issuer)
      Parameters:
      issuer - Token Issuer
      Returns:
      Optional#empty() if the issuer does not match the issuer of any open id client. If it matches, the open id client is returned wrapped in an optional