Package io.micronaut.security.oauth2
Class DefaultProviderResolver
java.lang.Object
io.micronaut.security.oauth2.DefaultProviderResolver
- All Implemented Interfaces:
ProviderResolver
Default implementation of
ProviderResolver.- Since:
- 1.2.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultProviderResolver(List<OpenIdClientConfiguration> openIdClientConfigurations) -
Method Summary
Modifier and TypeMethodDescriptionopenIdClientNameWhichMatchesIssClaim(io.micronaut.security.authentication.Authentication authentication) openIdClientNameWhichMatchesIssuer(@NonNull String issuer) resolveProvider(io.micronaut.security.authentication.Authentication authentication) Resolves the provider.
-
Constructor Details
-
DefaultProviderResolver
-
-
Method Details
-
resolveProvider
public Optional<String> resolveProvider(io.micronaut.security.authentication.Authentication authentication) Description copied from interface:ProviderResolverResolves the provider.- Specified by:
resolveProviderin interfaceProviderResolver- Parameters:
authentication- The authentication- Returns:
- An optional provider name
-
openIdClientNameWhichMatchesIssClaim
protected Optional<String> openIdClientNameWhichMatchesIssClaim(io.micronaut.security.authentication.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
-