Example usage for org.springframework.security.oauth2.provider.token RemoteTokenServices setCheckTokenEndpointUrl

List of usage examples for org.springframework.security.oauth2.provider.token RemoteTokenServices setCheckTokenEndpointUrl

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.provider.token RemoteTokenServices setCheckTokenEndpointUrl.

Prototype

public void setCheckTokenEndpointUrl(String checkTokenEndpointUrl) 

Source Link

Usage

From source file:io.gravitee.management.security.config.oauth2.OAuth2SecurityConfigurerAdapter.java

@Bean
public RemoteTokenServices remoteTokenServices() {
    RemoteTokenServices s = new RemoteTokenServices();
    s.setCheckTokenEndpointUrl(oauthEndpointCheckToken);
    s.setClientId(oauthClientId);//from  w w  w .j  a v a  2s. c o m
    s.setClientSecret(oauthClientSecret);
    return s;
}

From source file:st.malike.auth.client.security.SecurityConfig.java

@Bean
public ResourceServerTokenServices tokenService() {
    RemoteTokenServices tokenServices = new RemoteTokenServices();
    tokenServices.setClientId(appId);/*www .  jav  a  2s  .  c om*/
    tokenServices.setClientSecret(appSecret);
    tokenServices
            .setCheckTokenEndpointUrl("http://" + authServerHost + ":" + authServerPort + "/oauth/check_token");
    return tokenServices;
}

From source file:org.openlmis.fulfillment.security.ResourceServerSecurityConfiguration.java

/**
 * RemoteTokenServices bean initializer.
 * @param checkTokenUrl url to check tokens against
 * @param clientId client's id/*from  w w  w.  j  a va2  s .  com*/
 * @param clientSecret client's secret
 * @return token services
 */
@Bean
@Autowired
public RemoteTokenServices remoteTokenServices(@Value("${auth.server.url}") String checkTokenUrl,
        @Value("${auth.server.clientId}") String clientId,
        @Value("${auth.server.clientSecret}") String clientSecret) {
    final RemoteTokenServices remoteTokenServices = new RemoteTokenServices();
    remoteTokenServices.setCheckTokenEndpointUrl(checkTokenUrl);
    remoteTokenServices.setClientId(clientId);
    remoteTokenServices.setClientSecret(clientSecret);
    remoteTokenServices.setAccessTokenConverter(accessTokenConverter());
    return remoteTokenServices;
}