Java Code Examples for org.springframework.security.oauth2.provider.token.RemoteTokenServices#setClientSecret()
The following examples show how to use
org.springframework.security.oauth2.provider.token.RemoteTokenServices#setClientSecret() .
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 File: ResourceServerTokenServicesConfiguration.java From spring-security-oauth2-boot with Apache License 2.0 | 6 votes |
@Bean @ConditionalOnMissingBean(ResourceServerTokenServices.class) public RemoteTokenServices remoteTokenServices() { RemoteTokenServices services = new RemoteTokenServices(); services.setCheckTokenEndpointUrl(this.resource.getTokenInfoUri()); services.setClientId(this.resource.getClientId()); services.setClientSecret(this.resource.getClientSecret()); return services; }
Example 2
Source File: OpenHelper.java From open-cloud with MIT License | 5 votes |
/** * 构建自定义远程Token服务类 * * @param properties * @return */ public static RemoteTokenServices buildRemoteTokenServices(OpenCommonProperties properties) { // 使用自定义系统用户凭证转换器 DefaultAccessTokenConverter accessTokenConverter = buildAccessTokenConverter(); RemoteTokenServices tokenServices = new RemoteTokenServices(); tokenServices.setCheckTokenEndpointUrl(properties.getTokenInfoUri()); tokenServices.setClientId(properties.getClientId()); tokenServices.setClientSecret(properties.getClientSecret()); tokenServices.setAccessTokenConverter(accessTokenConverter); log.info("buildRemoteTokenServices[{}]", tokenServices); return tokenServices; }
Example 3
Source File: OauthResourceApplication.java From Spring with Apache License 2.0 | 5 votes |
@Bean public RemoteTokenServices remoteTokenServices() { final RemoteTokenServices tokenServices = new RemoteTokenServices(); tokenServices.setCheckTokenEndpointUrl("http://localhost:9090/oauth/check_token"); tokenServices.setClientId("resource1"); tokenServices.setClientSecret("secret"); return tokenServices; }
Example 4
Source File: OAuth2ResourceServerConfigRemoteTokenService.java From oauth2lab with MIT License | 5 votes |
@Primary @Bean public RemoteTokenServices tokenServices() { final RemoteTokenServices tokenService = new RemoteTokenServices(); tokenService.setCheckTokenEndpointUrl("http://localhost:8081/oauth/check_token"); tokenService.setClientId("fooClientIdPassword"); tokenService.setClientSecret("secret"); return tokenService; }
Example 5
Source File: ResourceServerConfiguration.java From microservices-oauth with Apache License 2.0 | 5 votes |
@Bean public ResourceServerTokenServices tokenService() { RemoteTokenServices tokenServices = new RemoteTokenServices(); tokenServices.setClientId("adminapp"); tokenServices.setClientSecret("password"); tokenServices.setCheckTokenEndpointUrl(authEndpoint + "/uaa/oauth/check_token"); return tokenServices; }
Example 6
Source File: OAuth2ResourceServer.java From OAuth-2.0-Cookbook with MIT License | 5 votes |
@Bean public RemoteTokenServices remoteTokenServices() { RemoteTokenServices tokenServices = new RemoteTokenServices(); tokenServices.setClientId("resource_server"); tokenServices.setClientSecret("abc123"); tokenServices.setCheckTokenEndpointUrl("http://localhost:8080/oauth/check_token"); tokenServices.setAccessTokenConverter(accessTokenConverter()); return new CustomRemoteTokenServices(tokenServices); }
Example 7
Source File: OAuth2ResourceServer.java From OAuth-2.0-Cookbook with MIT License | 5 votes |
@Bean public RemoteTokenServices remoteTokenServices() { RemoteTokenServices tokenServices = new RemoteTokenServices(); tokenServices.setClientId("resource_server"); tokenServices.setClientSecret("abc123"); tokenServices.setCheckTokenEndpointUrl("http://localhost:8080/oauth/check_token"); tokenServices.setAccessTokenConverter(accessTokenConverter()); return tokenServices; }
Example 8
Source File: ResourceServerConfig.java From multi-tenant-rest-api with MIT License | 5 votes |
@Bean public RemoteTokenServices LocalTokenService() { final RemoteTokenServices tokenService = new RemoteTokenServices(); tokenService.setCheckTokenEndpointUrl("http://localhost:8081/oauth/check_token"); tokenService.setClientId("my-client-with-secret"); tokenService.setClientSecret("secret"); return tokenService; }
Example 9
Source File: OAuth2ResourceServerConfigRemoteTokenService.java From spring-security-oauth with MIT License | 5 votes |
@Primary @Bean public RemoteTokenServices tokenServices() { final RemoteTokenServices tokenService = new RemoteTokenServices(); tokenService.setCheckTokenEndpointUrl("http://localhost:8081/spring-security-oauth-server/oauth/check_token"); tokenService.setClientId("fooClientIdPassword"); tokenService.setClientSecret("secret"); return tokenService; }