Example usage for org.springframework.security.oauth2.config.annotation.web.configurers AuthorizationServerSecurityConfigurer checkTokenAccess

List of usage examples for org.springframework.security.oauth2.config.annotation.web.configurers AuthorizationServerSecurityConfigurer checkTokenAccess

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.config.annotation.web.configurers AuthorizationServerSecurityConfigurer checkTokenAccess.

Prototype

String checkTokenAccess

To view the source code for org.springframework.security.oauth2.config.annotation.web.configurers AuthorizationServerSecurityConfigurer checkTokenAccess.

Click Source Link

Usage

From source file:com.springthunder.config.OAuth2Config.java

/**
 * Makes possible to check the token throw oauth/check_token
 *
 * @param oauthServer/* ww  w. ja  v a  2  s. c o m*/
 * @throws Exception
 */
@Override
public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception {
    oauthServer.checkTokenAccess("isAuthenticated()");
}

From source file:org.test.config.OAuthConfig.java

@Override
public void configure(final AuthorizationServerSecurityConfigurer security) throws Exception {
    security.checkTokenAccess("permitAll()");
}

From source file:de.pksoftware.springstrap.core.config.AuthServerConfigBase.java

/**
 * Configure the OAuth2 Authorization Server Security.
 *//*w w  w.  j  av a  2s .c o  m*/
@Override
public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception {
    //Only allow token access to authenticated accounts.
    oauthServer.checkTokenAccess("isAuthenticated()");

    //Allow form authentication for clients.
    oauthServer.allowFormAuthenticationForClients();
}