protected void configureCasClient ( final Collection < BaseClient > properties ) { val index = new AtomicInteger ( ) ; pac4jProperties . getCas ( ) . stream ( ) . filter ( cas -> StringUtils . isNotBlank ( cas . getLoginUrl ( ) ) ) . forEach ( cas -> { val cfg = new CasConfiguration ( cas . getLoginUrl ( ) , CasProtocol . valueOf ( cas . getProtocol ( ) ) ) ; cfg . setLogoutHandler ( casServerSpecificLogoutHandler ) ; val client = new CasClient ( cfg ) ; val count = index . intValue ( ) ; if ( StringUtils . isBlank ( cas . getClientName ( ) ) ) { client . setName ( client . getClass ( ) . getSimpleName ( ) + count ) ; } client . setCallbackUrlResolver ( new PathParameterCallbackUrlResolver ( ) ) ; configureClient ( client , cas ) ; index . incrementAndGet ( ) ; LOGGER . debug ( "Created client [{}]" , client ) ; properties . add ( client ) ; } ) ; }
Configure cas client .