@Test public void buildAuthorizeUrl_codeResponseType() { OAuth2Parameters parameters = new OAuth2Parameters(); parameters.setRedirectUri("https: parameters.setScope("read,write"); String expected = AUTHORIZE_URL + "?client_id=client_id&response_type=code&redirect_uri=https%3A%2F%2Fwww.someclient.com%2Fconnect%2Ffoo&scope=read%2Cwrite"; String actual = oAuth2Template.buildAuthorizeUrl(parameters); assertEquals(expected, actual); }
public String buildAuthorizeUrl(OAuth2Parameters parameters) { return buildAuthUrl(authorizeUrl, GrantType.AUTHORIZATION_CODE, parameters); }
OAuth2Template implements OAuth2Operations { public String buildAuthorizeUrl(OAuth2Parameters parameters) { return buildAuthUrl(authorizeUrl, GrantType.AUTHORIZATION_CODE, parameters); } }
OAuth2Template implements OAuth2Operations { public String buildAuthorizeUrl(OAuth2Parameters parameters) { return buildAuthUrl(authorizeUrl, GrantType.AUTHORIZATION_CODE, parameters); } OAuth2Template(String clientId, String clientSecret, String authorizeUrl, String accessTokenUrl);  OAuth2Template(String clientId, String clientSecret, String authorizeUrl, String authenticateUrl, String accessTokenUrl); }
OAuth2Template implements OAuth2Operations { public String buildAuthorizeUrl(OAuth2Parameters parameters) { return buildAuthUrl(authorizeUrl, GrantType.AUTHORIZATION_CODE, parameters); } OAuth2Template(String clientId, String clientSecret, String authorizeUrl, String accessTokenUrl);  OAuth2Template(String clientId, String clientSecret, String authorizeUrl, String authenticateUrl, String accessTokenUrl); void setUseParametersForClientAuthentication(boolean useParametersForClientAuthentication); void setRequestFactory(ClientHttpRequestFactory requestFactory); String buildAuthorizeUrl(OAuth2Parameters parameters); String buildAuthorizeUrl(GrantType grantType, OAuth2Parameters parameters); String buildAuthenticateUrl(OAuth2Parameters parameters); String buildAuthenticateUrl(GrantType grantType, OAuth2Parameters parameters); AccessGrant exchangeForAccess(String authorizationCode, String redirectUri, MultiValueMap<String, String> additionalParameters); AccessGrant exchangeCredentialsForAccess(String username, String password, MultiValueMap<String, String> additionalParameters); @Deprecated AccessGrant refreshAccess(String refreshToken, String scope, MultiValueMap<String, String> additionalParameters); AccessGrant refreshAccess(String refreshToken, MultiValueMap<String, String> additionalParameters); AccessGrant authenticateClient(); AccessGrant authenticateClient(String scope); }
OAuth2Template implements OAuth2Operations { public String buildAuthorizeUrl(OAuth2Parameters parameters) { return buildAuthUrl(authorizeUrl, GrantType.AUTHORIZATION_CODE, parameters); } OAuth2Template(String clientId, String clientSecret, String authorizeUrl, String accessTokenUrl);  OAuth2Template(String clientId, String clientSecret, String authorizeUrl, String authenticateUrl, String accessTokenUrl); void setUseParametersForClientAuthentication(boolean useParametersForClientAuthentication); void setRequestFactory(ClientHttpRequestFactory requestFactory); String buildAuthorizeUrl(OAuth2Parameters parameters); String buildAuthorizeUrl(GrantType grantType, OAuth2Parameters parameters); String buildAuthenticateUrl(OAuth2Parameters parameters); String buildAuthenticateUrl(GrantType grantType, OAuth2Parameters parameters); AccessGrant exchangeForAccess(String authorizationCode, String redirectUri, MultiValueMap<String, String> additionalParameters); AccessGrant exchangeCredentialsForAccess(String username, String password, MultiValueMap<String, String> additionalParameters); @Deprecated AccessGrant refreshAccess(String refreshToken, String scope, MultiValueMap<String, String> additionalParameters); AccessGrant refreshAccess(String refreshToken, MultiValueMap<String, String> additionalParameters); AccessGrant authenticateClient(); AccessGrant authenticateClient(String scope);  }