handler.handle(Future.succeededFuture(hasApplicationRole(accessToken, options.getClientID(), parts[0]))); return;
public AuthCodeImpl(OAuth2AuthProviderImpl provider) { super(provider.getVertx(), provider.getConfig()); this.provider = provider; // validation throwIfNull("clientId", config.getClientID()); }
/** * 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 AuthJWTImpl(OAuth2AuthProviderImpl provider) { super(provider.getVertx(), provider.getConfig()); this.provider = provider; // validation throwIfNull("clientId", config.getClientID()); throwIfNull("pubSecKeys", config.getPubSecKeys()); if (config.getPubSecKeys().size() == 0) { throwIfNull("pubSecKey", null); } }
String basic = config.getClientID() + ":" + config.getClientSecret(); headers.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(basic.getBytes())); form.put("client_id", config.getClientID()); form.put("grant_type", grantType);
form.put("client_id", config.getClientID());
.put("refresh_token", opaqueRefreshToken()) .put("client_id", config.getClientID());
String basic = config.getClientID() + ":" + (config.getClientSecret() == null ? "" : config.getClientSecret()); headers.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(basic.getBytes()));
json.put("authorizationPath", obj.getAuthorizationPath()); if (obj.getClientID() != null) { json.put("clientID", obj.getClientID());
clientID = other.getClientID(); clientSecret = other.getClientSecret(); pubSecKeys = other.getPubSecKeys();