protected Set < Event > resolveSingleMultifactorProvider ( final Optional < RequestContext > context , final RegisteredService service , final Principal principal , final Collection < MultifactorAuthenticationProvider > providers ) { val globalPrincipalAttributeValueRegex = casProperties . getAuthn ( ) . getMfa ( ) . getGlobalPrincipalAttributeValueRegex ( ) ; val provider = providers . iterator ( ) . next ( ) ; LOGGER . trace ( "Found a single multifactor provider [{}] in the application context" , provider ) ; val attributeNames = commaDelimitedListToSet ( casProperties . getAuthn ( ) . getMfa ( ) . getGlobalPrincipalAttributeNameTriggers ( ) ) ; return multifactorAuthenticationProviderResolver . resolveEventViaPrincipalAttribute ( principal , attributeNames , service , context , providers , input -> input != null && input . matches ( globalPrincipalAttributeValueRegex ) ) ; }
Resolve single multifactor provider set .