Class OauthClientEnabledCondition
java.lang.Object
io.micronaut.security.oauth2.client.condition.AbstractCondition
io.micronaut.security.oauth2.client.condition.OauthClientEnabledCondition
- All Implemented Interfaces:
io.micronaut.context.condition.Condition, Predicate<io.micronaut.context.condition.ConditionContext>
Matches when the OAuth 2.0 client named by the bean qualifier is enabled.
Used instead of throwing DisabledBeanException from an
@EachBean factory method: a condition removes the disabled candidate before eager
initialization, whereas an exception thrown while a @Context definition is being
initialized stops the remaining candidates of that definition from being created at startup.
- Since:
- 5.5.2
- Author:
- Sergio del Amo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @NonNull StringgetFailureMessagePrefix(@NonNull String name) protected booleanhandleConfigurationEnabled(@NonNull OauthClientConfiguration clientConfiguration, @NonNull io.micronaut.context.condition.ConditionContext<?> context, @NonNull String failureMsgPrefix) Methods inherited from class AbstractCondition
matchesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.context.condition.Condition
test
-
Constructor Details
-
OauthClientEnabledCondition
public OauthClientEnabledCondition()
-
-
Method Details
-
getFailureMessagePrefix
- Specified by:
getFailureMessagePrefixin classAbstractCondition
-
handleConfigurationEnabled
protected boolean handleConfigurationEnabled(@NonNull OauthClientConfiguration clientConfiguration, @NonNull io.micronaut.context.condition.ConditionContext<?> context, @NonNull String failureMsgPrefix) - Specified by:
handleConfigurationEnabledin classAbstractCondition
-