Java Code Examples for org.springframework.security.oauth2.provider.code.JdbcAuthorizationCodeServices

The following examples show how to use org.springframework.security.oauth2.provider.code.JdbcAuthorizationCodeServices. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: oauth-server   Source File: AuthorizationServerConfig.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 用来配置授权(authorization)以及令牌(token)的访问端点和令牌服务(token services)。
 * <p>
 * authenticationManager: 注入一个AuthenticationManager后,password grant将打开
 * userDetailsService: 如果注入了一个UserDetailsService,refresh token grant将对用户状态进行校验,以保证用户处于激活状态
 * authorizationCodeServices: 这个属性是用来设置授权码服务的(即 AuthorizationCodeServices 的实例对象),主要用于 "authorization_code" 授权码类型模式。
 * CustomTokenStore extends JdbcTokenStore: 令牌会被保存进关系型数据库
 */
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
    endpoints
            .addInterceptor(customClientInterceptor)
            .authorizationCodeServices(new JdbcAuthorizationCodeServices(dataSource))
            .tokenStore(tokenStore)
            .tokenServices(setTokenService(endpoints))
            .userDetailsService(userDetailsService)
            .authenticationManager(authenticationManager)
            .redirectResolver(new ChoerodonRedirectResolver());
}
 
Example 2
Source Project: cola   Source File: AuthorizationServerConfiguration.java    License: MIT License 4 votes vote down vote up
@Bean
public AuthorizationCodeServices authorizationCodeServices() {
	return new JdbcAuthorizationCodeServices(dataSource);
}
 
Example 3
Source Project: pacbot   Source File: AuthorizationServerConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public AuthorizationCodeServices authorizationCodeServices() {
    return new JdbcAuthorizationCodeServices(dataSource);
}
 
Example 4
Source Project: spring-cloud-shop   Source File: AuthApplication.java    License: MIT License 4 votes vote down vote up
@Bean
public AuthorizationCodeServices jdbcAuthorizationCodeServices(DataSource dataSource) {
    return new JdbcAuthorizationCodeServices(dataSource);
}
 
Example 5
Source Project: JetfireCloud   Source File: AuthenticationServerConfig.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 授权码模式持久名授权码
 *
 * @return
 */
@Bean
protected AuthorizationCodeServices authorizationCodeServices() {
    //授权码存储等处理方式类,使用jdbc,操作oauth_code表
    return new JdbcAuthorizationCodeServices(dataSource);
}
 
Example 6
Source Project: SpringCloud   Source File: AuthorizationServerConfig.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 授权码模式持久化授权码code
 *
 * @return JdbcAuthorizationCodeServices
 */
@Bean
protected AuthorizationCodeServices authorizationCodeServices() {
    // 授权码存储等处理方式类,使用jdbc,操作oauth_code表
    return new JdbcAuthorizationCodeServices(dataSource);
}
 
Example 7
@Bean
protected AuthorizationCodeServices authorizationCodeServices() {
    return new JdbcAuthorizationCodeServices(dataSource);
}
 
Example 8
@Bean( "authorizationCodeServices" )
public JdbcAuthorizationCodeServices jdbcAuthorizationCodeServices( )
{
    return new JdbcAuthorizationCodeServices( dataSource );
}
 
Example 9
@Bean
protected AuthorizationCodeServices authorizationCodeServices() {
	return new JdbcAuthorizationCodeServices(dataSource);
}
 
Example 10
@Bean
public AuthorizationCodeServices authorizationCodeServices(DataSource dataSource) {
    return new JdbcAuthorizationCodeServices(dataSource);
}
 
Example 11
Source Project: spring-oauth-example   Source File: OAuthConfiguration.java    License: MIT License 4 votes vote down vote up
@Bean
public AuthorizationCodeServices authorizationCodeServices() {
    return new JdbcAuthorizationCodeServices(oauthDataSource());
}
 
Example 12
Source Project: open-cloud   Source File: AuthorizationServerConfiguration.java    License: MIT License 2 votes vote down vote up
/**
 * 授权码存放
 *
 * @return
 */
@Bean
public AuthorizationCodeServices authorizationCodeServices() {
    return new JdbcAuthorizationCodeServices(dataSource);
}
 
Example 13
Source Project: open-cloud   Source File: AuthorizationServerConfiguration.java    License: MIT License 2 votes vote down vote up
/**
 * 授权码
 *
 * @return
 */
@Bean
public AuthorizationCodeServices authorizationCodeServices() {
    return new JdbcAuthorizationCodeServices(dataSource);
}