Search in sources :

Example 1 with RestAuthenticationProperties

use of org.apereo.cas.configuration.model.support.rest.RestAuthenticationProperties in project cas by apereo.

the class CasRestAuthenticationConfiguration method restAuthenticationHandler.

@Bean
@RefreshScope
public AuthenticationHandler restAuthenticationHandler() {
    final RestAuthenticationProperties rest = casProperties.getAuthn().getRest();
    final RestAuthenticationHandler r = new RestAuthenticationHandler(rest.getName(), restAuthenticationApi());
    r.setPasswordEncoder(Beans.newPasswordEncoder(rest.getPasswordEncoder()));
    return r;
}
Also used : RestAuthenticationHandler(org.apereo.cas.adaptors.rest.RestAuthenticationHandler) RestAuthenticationProperties(org.apereo.cas.configuration.model.support.rest.RestAuthenticationProperties) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

RestAuthenticationHandler (org.apereo.cas.adaptors.rest.RestAuthenticationHandler)1 RestAuthenticationProperties (org.apereo.cas.configuration.model.support.rest.RestAuthenticationProperties)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1