Search in sources :

Example 1 with TokenEndpoint

use of org.springframework.security.oauth2.provider.endpoint.TokenEndpoint in project spring-security-oauth by spring-projects.

the class AuthorizationServerEndpointsConfiguration method tokenEndpoint.

@Bean
public TokenEndpoint tokenEndpoint() throws Exception {
    TokenEndpoint tokenEndpoint = new TokenEndpoint();
    tokenEndpoint.setClientDetailsService(clientDetailsService);
    tokenEndpoint.setProviderExceptionHandler(exceptionTranslator());
    tokenEndpoint.setTokenGranter(tokenGranter());
    tokenEndpoint.setOAuth2RequestFactory(oauth2RequestFactory());
    tokenEndpoint.setOAuth2RequestValidator(oauth2RequestValidator());
    tokenEndpoint.setAllowedRequestMethods(allowedTokenEndpointRequestMethods());
    return tokenEndpoint;
}
Also used : CheckTokenEndpoint(org.springframework.security.oauth2.provider.endpoint.CheckTokenEndpoint) TokenEndpoint(org.springframework.security.oauth2.provider.endpoint.TokenEndpoint) AbstractFactoryBean(org.springframework.beans.factory.config.AbstractFactoryBean) FactoryBean(org.springframework.beans.factory.FactoryBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

FactoryBean (org.springframework.beans.factory.FactoryBean)1 AbstractFactoryBean (org.springframework.beans.factory.config.AbstractFactoryBean)1 Bean (org.springframework.context.annotation.Bean)1 CheckTokenEndpoint (org.springframework.security.oauth2.provider.endpoint.CheckTokenEndpoint)1 TokenEndpoint (org.springframework.security.oauth2.provider.endpoint.TokenEndpoint)1