/** * Construct the URL to be used to redirect the user to the authorization page of the OAuth "Authorization Server" * * @param params - redirectURI: A String that represents the registered application URI where the user is redirected after authorization. * scope: A String that represents the application privileges. Set to "openid" for OpenID Connect. * scopes: A array of strings that will encoded as a single string "scope" following the provider requirements * state: A String that represents an optional opaque value used by the client to maintain state between the request and the callback. */ @Override public String authorizeURL(JsonObject params) { final JsonObject query = params.copy(); if (query.containsKey("scopes")) { // scopes have been passed as a list so the provider must generate the correct string for it query.put("scope", String.join(config.getScopeSeparator(), query.getJsonArray("scopes").getList())); query.remove("scopes"); } query.put("response_type", "code"); query.put("client_id", config.getClientID()); final String path = config.getAuthorizationPath(); final String url = path.charAt(0) == '/' ? config.getSite() + path : path; return url + '?' + stringify(query); }
public static void toJson(OAuth2ClientOptions obj, java.util.Map<String, Object> json) { if (obj.getAuthorizationPath() != null) { json.put("authorizationPath", obj.getAuthorizationPath());
authorizationPath = other.getAuthorizationPath(); tokenPath = other.getTokenPath(); revocationPath = other.getRevocationPath();