Examples of OAuth2RestTemplate


Examples of org.springframework.security.oauth2.client.OAuth2RestTemplate

    public OAuth2RestOperations restTemplate() {
      AuthorizationCodeResourceDetails resource = new AuthorizationCodeResourceDetails();
      resource.setClientId("client");
      resource.setAccessTokenUri("http://example.com/token");
      resource.setUserAuthorizationUri("http://example.com/authorize");
      return new OAuth2RestTemplate(resource, new DefaultOAuth2ClientContext(accessTokenRequest));
    }
View Full Code Here

Examples of org.springframework.security.oauth2.client.OAuth2RestTemplate

    }

    @Bean
    @Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)
    public OAuth2RestTemplate facebookRestTemplate() {
      OAuth2RestTemplate template = new OAuth2RestTemplate(facebook(), new DefaultOAuth2ClientContext(
          accessTokenRequest));
      MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
      converter.setSupportedMediaTypes(Arrays.asList(MediaType.APPLICATION_JSON,
          MediaType.valueOf("text/javascript")));
      template.setMessageConverters(Arrays.<HttpMessageConverter<?>> asList(converter));
      return template;
    }
View Full Code Here

Examples of org.springframework.security.oauth2.client.OAuth2RestTemplate

    }

    @Bean
    @Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)
    public OAuth2RestTemplate sparklrRestTemplate() {
      return new OAuth2RestTemplate(sparklr(), new DefaultOAuth2ClientContext(accessTokenRequest));
    }
View Full Code Here

Examples of org.springframework.security.oauth2.client.OAuth2RestTemplate

    }

    @Bean
    @Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)
    public OAuth2RestTemplate sparklrRedirectRestTemplate() {
      return new OAuth2RestTemplate(sparklrRedirect(), new DefaultOAuth2ClientContext(accessTokenRequest));
    }
View Full Code Here

Examples of org.springframework.security.oauth2.client.OAuth2RestTemplate

      return new OAuth2RestTemplate(sparklrRedirect(), new DefaultOAuth2ClientContext(accessTokenRequest));
    }

    @Bean
    public OAuth2RestTemplate trustedClientRestTemplate() {
      return new OAuth2RestTemplate(trusted(), new DefaultOAuth2ClientContext());
    }
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.