Examples of OAuth2AuthenticationProcessingFilter


Examples of org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter

  public void testAuthenticationManager() {
    GenericXmlApplicationContext context = new GenericXmlApplicationContext(
        getClass(), "resource-server-authmanager-context.xml");
    // System.err.println(Arrays.asList(context.getBeanDefinitionNames()));
    assertTrue(context.containsBeanDefinition("oauth2ProviderFilter"));
    OAuth2AuthenticationProcessingFilter filter = context.getBean(OAuth2AuthenticationProcessingFilter.class);
    assertEquals(context.getBean(AuthenticationManager.class), ReflectionTestUtils.getField(filter, "authenticationManager"));
    assertNotNull(ReflectionTestUtils.getField(filter, "tokenExtractor"));
    context.close();
  }
View Full Code Here

Examples of org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter

  @Override
  public void configure(HttpSecurity http) throws Exception {

    AuthenticationManager oauthAuthenticationManager = oauthAuthenticationManager(http);
    resourcesServerFilter = new OAuth2AuthenticationProcessingFilter();
    resourcesServerFilter.setAuthenticationManager(oauthAuthenticationManager);
    if (tokenExtractor != null) {
      resourcesServerFilter.setTokenExtractor(tokenExtractor);
    }
    resourcesServerFilter = postProcess(resourcesServerFilter);
View Full Code Here

Examples of org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter

        clientCredentialsTokenEndpointFilter.setAuthenticationManager(http
                .getAuthenticationManager());
        clientCredentialsTokenEndpointFilter = postProcess(clientCredentialsTokenEndpointFilter);

        AuthenticationManager oauthAuthenticationManager = oauthAuthenticationManager(http);
        resourcesServerFilter = new OAuth2AuthenticationProcessingFilter();
        resourcesServerFilter.setAuthenticationManager(oauthAuthenticationManager);
        resourcesServerFilter = postProcess(resourcesServerFilter);

        this.tokenGranter = tokenGranter(http);
        this.consumerTokenServices = consumerTokenServices(http);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.