use of org.springframework.security.oauth2.provider.client.InMemoryClientDetailsService in project spring-security-oauth by spring-projects.
the class InMemoryClientDetailsServiceBuilder method performBuild.
@Override
protected ClientDetailsService performBuild() {
InMemoryClientDetailsService clientDetailsService = new InMemoryClientDetailsService();
clientDetailsService.setClientDetailsStore(clientDetails);
return clientDetailsService;
}
use of org.springframework.security.oauth2.provider.client.InMemoryClientDetailsService in project spring-security-oauth by spring-projects.
the class ApprovalStoreUserApprovalHandlerTests method init.
@Before
public void init() {
handler.setApprovalStore(store);
InMemoryClientDetailsService clientDetailsService = new InMemoryClientDetailsService();
Map<String, ClientDetails> map = new HashMap<String, ClientDetails>();
map.put("client", new BaseClientDetails("client", null, "read,write", "authorization_code", null));
clientDetailsService.setClientDetailsStore(map);
handler.setRequestFactory(new DefaultOAuth2RequestFactory(clientDetailsService));
userAuthentication = new UsernamePasswordAuthenticationToken("user", "N/A", AuthorityUtils.commaSeparatedStringToAuthorityList("USER"));
}
use of org.springframework.security.oauth2.provider.client.InMemoryClientDetailsService in project spring-security-oauth by spring-projects.
the class ClientScopeVoterTests method init.
@Before
public void init() {
AuthorizationRequest authorizationRequest = new AuthorizationRequest();
authorizationRequest.setClientId("client");
authorizationRequest.setScope(Arrays.asList("read", "write"));
authentication = new OAuth2Authentication(authorizationRequest.createOAuth2Request(), userAuthentication);
InMemoryClientDetailsService clientDetailsService = new InMemoryClientDetailsService();
client = new BaseClientDetails("client", "source", "read,write", "authorization_code,client_credentials", "read");
clientDetailsService.setClientDetailsStore(Collections.singletonMap("client", client));
voter.setClientDetailsService(clientDetailsService);
}
Aggregations