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>

@Internal public class OauthClientEnabledCondition extends AbstractCondition
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