Java 类org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties 实例源码
项目:DAFramework
文件:OAuth2Util.java
public static Filter general(AuthorizationCodeResourceDetails client, ResourceServerProperties resourceServerProperties, String path, OAuth2ClientContext oauth2ClientContext) {
OAuth2ClientAuthenticationProcessingFilter oAuth2ClientAuthenticationFilter = new OAuth2ClientAuthenticationProcessingFilter(path){
protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response,
FilterChain chain, Authentication authResult) throws IOException, ServletException {
super.successfulAuthentication(request, response, chain, authResult);
OAuth2AccessToken accessToken = restTemplate.getAccessToken();
log.warn(new Gson().toJson(authResult));
log.warn(new Gson().toJson(accessToken));
}
};
OAuth2RestTemplate oAuth2RestTemplate = new OAuth2RestTemplate(client, oauth2ClientContext);
oAuth2ClientAuthenticationFilter.setRestTemplate(oAuth2RestTemplate);
UserInfoTokenServices tokenServices = new UserInfoTokenServices(resourceServerProperties.getUserInfoUri(), client.getClientId());
tokenServices.setRestTemplate(oAuth2RestTemplate);
oAuth2ClientAuthenticationFilter.setTokenServices(tokenServices);
return oAuth2ClientAuthenticationFilter;
}
项目:DAFramework
文件:OAuth2Util.java
public static Filter wechat(AuthorizationCodeResourceDetails client, ResourceServerProperties resourceServerProperties, String path, OAuth2ClientContext oauth2ClientContext) {
OAuth2ClientAuthenticationProcessingFilter oAuth2ClientAuthenticationFilter = new OAuth2ClientAuthenticationProcessingFilter(path);
OAuth2RestTemplate oAuth2RestTemplate = new OAuth2RestTemplate(client, oauth2ClientContext);
AuthorizationCodeAccessTokenProvider accessTokenProvider = new AuthorizationCodeAccessTokenProvider();
accessTokenProvider.setAuthorizationRequestEnhancer((request, resource, form, headers) -> {
form.set("appid", resource.getClientId());
form.set("secret", resource.getClientSecret());
form.set("scope", "snsapi_userinfo");
form.set("response_type", "code");
form.set("#wechat_redirect", "");
});
accessTokenProvider.setMessageConverters(converters());
oAuth2RestTemplate.setAccessTokenProvider(accessTokenProvider);
oAuth2RestTemplate.setRetryBadAccessTokens(true);
oAuth2ClientAuthenticationFilter.setRestTemplate(oAuth2RestTemplate);
UserInfoTokenServices tokenServices = new UserInfoTokenServices(resourceServerProperties.getUserInfoUri(), client.getClientId());
tokenServices.setRestTemplate(oAuth2RestTemplate);
oAuth2ClientAuthenticationFilter.setTokenServices(tokenServices);
return oAuth2ClientAuthenticationFilter;
}
项目:credhub
文件:AuthWithoutOAuthConfiguration.java
@Autowired
AuthWithoutOAuthConfiguration(
ResourceServerProperties resourceServerProperties,
PreAuthenticationFailureFilter preAuthenticationFailureFilter
) {
this.resourceServerProperties = resourceServerProperties;
this.preAuthenticationFailureFilter = preAuthenticationFailureFilter;
}
项目:credhub
文件:AuthConfiguration.java
@Autowired
AuthConfiguration(
ResourceServerProperties resourceServerProperties,
AuditOAuth2AuthenticationExceptionHandler auditOAuth2AuthenticationExceptionHandler,
AuditOAuth2AccessDeniedHandler auditOAuth2AccessDeniedHandler,
PreAuthenticationFailureFilter preAuthenticationFailureFilter,
OAuth2ExtraValidationFilter oAuth2ExtraValidationFilter
) {
this.resourceServerProperties = resourceServerProperties;
this.auditOAuth2AuthenticationExceptionHandler = auditOAuth2AuthenticationExceptionHandler;
this.auditOAuth2AccessDeniedHandler = auditOAuth2AccessDeniedHandler;
this.preAuthenticationFailureFilter = preAuthenticationFailureFilter;
this.oAuth2ExtraValidationFilter = oAuth2ExtraValidationFilter;
}
项目:spring-security-oauth2-boot
文件:OAuth2AutoConfiguration.java
@Bean
public ResourceServerProperties resourceServerProperties() {
return new ResourceServerProperties(this.credentials.getClientId(),
this.credentials.getClientSecret());
}
项目:spring-security-oauth2-boot
文件:OAuth2AutoConfigurationTests.java
protected CustomResourceServer(ResourceServerProperties config) {
this.config = config;
}
项目:movie-db-java-on-azure
文件:SecurityConfig.java
@Bean
@ConfigurationProperties("facebook.resource")
public ResourceServerProperties facebookResource() {
return new ResourceServerProperties();
}
项目:emergentmud
文件:SecurityConfiguration.java
@Bean
@ConfigurationProperties("facebook.resource")
public ResourceServerProperties facebookResource() {
return new ResourceServerProperties();
}
项目:emergentmud
文件:SecurityConfiguration.java
@Bean
@ConfigurationProperties("google.resource")
public ResourceServerProperties googleResource() {
return new ResourceServerProperties();
}
项目:Facegram
文件:GroupRepositoryTest.java
@Bean
public ResourceServerProperties resourceServerProperties(){
return new ResourceServerProperties();
}
项目:Facegram
文件:UserRepositoryTest.java
@Bean
public ResourceServerProperties resourceServerProperties(){
return new ResourceServerProperties();
}
项目:sns-todo
文件:ClientResources.java
public ResourceServerProperties getResource() {
return resource;
}
项目:springboot-security-wechat
文件:SecurityConfig.java
public ResourceServerProperties getResource() {
return resource;
}
项目:DAFramework
文件:OAuth2ClientResources.java
public ResourceServerProperties getResource() {
return resource;
}
项目:referenceapp
文件:OAuthService.java
@Bean
@ConfigurationProperties("facebook.resource")
public ResourceServerProperties facebookResource() {
return new ResourceServerProperties();
}
项目:weazbootgradle
文件:ResourceServerConfiguration.java
public ResourceServerConfiguration(ResourceServerProperties resource,
CustomOAuth2AuthenticationManager customOAuth2AuthenticationManager) {
this.resource = resource;
this.customOAuth2AuthenticationManager = customOAuth2AuthenticationManager;
}
项目:service-authorization
文件:ClientResources.java
public ResourceServerProperties getResource() {
return resource;
}
项目:alpha-umi
文件:ClientResources.java
public ResourceServerProperties getResource() {
return resource;
}
项目:spring_boot
文件:ClientResources.java
public ResourceServerProperties getResource() {
return resource;
}
项目:Robocode
文件:SecurityConfig.java
public ResourceServerProperties getResource() {
return resource;
}
项目:eve-oauth2-example
文件:EveOAuth2Example.java
@Bean
@ConfigurationProperties("eve.resource")
protected ResourceServerProperties eveResource()
{
return new ResourceServerProperties();
}
项目:spring-boot-magneto
文件:ClientResources.java
public ResourceServerProperties getResource() {
return resource;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:OAuth2AutoConfiguration.java
@Bean
public ResourceServerProperties resourceServerProperties() {
return new ResourceServerProperties(this.credentials.getClientId(),
this.credentials.getClientSecret());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:OAuth2AutoConfigurationTests.java
protected CustomResourceServer(ResourceServerProperties config) {
this.config = config;
}
项目:hawkbit-extensions
文件:UaaClientProperties.java
public ResourceServerProperties getResource() {
return resource;
}
项目:marketplace
文件:ClientResources.java
public ResourceServerProperties getResource() {
return resource;
}
项目:spring-boot-concourse
文件:OAuth2AutoConfiguration.java
@Bean
public ResourceServerProperties resourceServerProperties() {
return new ResourceServerProperties(this.credentials.getClientId(),
this.credentials.getClientSecret());
}
项目:spring-boot-concourse
文件:OAuth2AutoConfigurationTests.java
protected CustomResourceServer(ResourceServerProperties config) {
this.config = config;
}
项目:credhub
文件:OAuth2Configuration.java
@Bean
public ResourceServerProperties resourceServerProperties() {
return new ResourceServerProperties();
}
项目:contestparser
文件:OAuth2AutoConfiguration.java
@Bean
public ResourceServerProperties resourceServerProperties() {
return new ResourceServerProperties(this.credentials.getClientId(),
this.credentials.getClientSecret());
}
项目:nextrtc-videochat-with-rest
文件:WebSecurityConfig.java
public ResourceServerProperties getResource() {
return resource;
}
项目:come2help
文件:ClientResourceDetails.java
public ResourceServerProperties getResource() {
return resource;
}
项目:spring-oauth2-jwt-minimal
文件:OAuth2ClientConfigurer.java
public ResourceServerProperties getResource() {
return resource;
}
项目:JavaSecurity
文件:SsoWithGitHubApplication.java
public ResourceServerProperties getResource() {
return resource;
}