org.springframework.security.oauth2.client.web.AuthenticatedPrincipalOAuth2AuthorizedClientRepository Java Examples

The following examples show how to use org.springframework.security.oauth2.client.web.AuthenticatedPrincipalOAuth2AuthorizedClientRepository. 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: CredHubOAuth2AutoConfiguration.java    From spring-credhub with Apache License 2.0 5 votes vote down vote up
/**
 * Create an {@code OAuth2AuthorizedClientRepository} bean for use with an
 * OAuth2-enabled {@code CredHubTemplate}.
 * @param clientRegistrationRepository a {@code ClientRegistrationRepository}
 * @return the {@code OAuth2AuthorizedClientRepository}
 */
@Bean
@ConditionalOnMissingBean
@ConditionalOnClass(name = "javax.servlet.http.HttpServletRequest")
public OAuth2AuthorizedClientRepository credHubAuthorizedClientRepository(
		ClientRegistrationRepository clientRegistrationRepository) {
	return new AuthenticatedPrincipalOAuth2AuthorizedClientRepository(
			new InMemoryOAuth2AuthorizedClientService(clientRegistrationRepository));
}
 
Example #2
Source File: TestSecurityConfiguration.java    From java-microservices-examples with Apache License 2.0 4 votes vote down vote up
@Bean
public OAuth2AuthorizedClientRepository authorizedClientRepository(OAuth2AuthorizedClientService authorizedClientService) {
    return new AuthenticatedPrincipalOAuth2AuthorizedClientRepository(authorizedClientService);
}
 
Example #3
Source File: TestSecurityConfiguration.java    From java-microservices-examples with Apache License 2.0 4 votes vote down vote up
@Bean
public OAuth2AuthorizedClientRepository authorizedClientRepository(OAuth2AuthorizedClientService authorizedClientService) {
    return new AuthenticatedPrincipalOAuth2AuthorizedClientRepository(authorizedClientService);
}
 
Example #4
Source File: TestSecurityConfiguration.java    From java-microservices-examples with Apache License 2.0 4 votes vote down vote up
@Bean
public OAuth2AuthorizedClientRepository authorizedClientRepository(OAuth2AuthorizedClientService authorizedClientService) {
    return new AuthenticatedPrincipalOAuth2AuthorizedClientRepository(authorizedClientService);
}
 
Example #5
Source File: TestSecurityConfiguration.java    From jhipster-registry with Apache License 2.0 4 votes vote down vote up
@Bean
public OAuth2AuthorizedClientRepository authorizedClientRepository(OAuth2AuthorizedClientService authorizedClientService) {
    return new AuthenticatedPrincipalOAuth2AuthorizedClientRepository(authorizedClientService);
}