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
- Author:
- James Kleeh
-
Constructor Summary
ConstructorDescriptionDefaultProviderResolver
(List<OpenIdClientConfiguration> openIdClientConfigurations) -
Method Summary
Modifier and TypeMethodDescriptionopenIdClientNameWhichMatchesIssClaim
(Authentication authentication) openIdClientNameWhichMatchesIssuer
(@NonNull String issuer) resolveProvider
(Authentication authentication) Resolves the provider.
-
Constructor Details
-
DefaultProviderResolver
-
-
Method Details
-
resolveProvider
Description copied from interface:ProviderResolver
Resolves the provider.- Specified by:
resolveProvider
in interfaceProviderResolver
- Parameters:
authentication
- The authentication- Returns:
- An optional provider name
-
openIdClientNameWhichMatchesIssClaim
- 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
-