Package io.micronaut.security.oauth2
Class DefaultProviderResolver
- java.lang.Object
-
- io.micronaut.security.oauth2.DefaultProviderResolver
-
- All Implemented Interfaces:
ProviderResolver
@Singleton public class DefaultProviderResolver extends java.lang.Object implements ProviderResolver
Default implementation ofProviderResolver.- Since:
- 1.2.0
-
-
Constructor Summary
Constructors Constructor Description DefaultProviderResolver(java.util.List<OpenIdClientConfiguration> openIdClientConfigurations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Optional<java.lang.String>openIdClientNameWhichMatchesIssClaim(io.micronaut.security.authentication.Authentication authentication)protected java.util.Optional<java.lang.String>openIdClientNameWhichMatchesIssuer(java.lang.String issuer)java.util.Optional<java.lang.String>resolveProvider(io.micronaut.security.authentication.Authentication authentication)Resolves the provider.
-
-
-
Constructor Detail
-
DefaultProviderResolver
public DefaultProviderResolver(java.util.List<OpenIdClientConfiguration> openIdClientConfigurations)
-
-
Method Detail
-
resolveProvider
public java.util.Optional<java.lang.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 java.util.Optional<java.lang.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 java.util.Optional<java.lang.String> openIdClientNameWhichMatchesIssuer(@NonNull java.lang.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
-
-