HashMap m = new HashMap(); m.put(OA2Constants.RESPONSE_TYPE, OA2Constants.AUTHORIZATION_CODE); m.put(OA2Constants.CLIENT_ID, acRequest.getClient().getIdentifierString()); m.put(OA2Constants.SCOPE, OA2Scopes.SCOPE_OPENID + " " + OA2Scopes.SCOPE_MYPROXY + " " + OA2Scopes.SCOPE_PROFILE); m.put(OA2Constants.REDIRECT_URI, acRequest.getParameters().get(OA2Constants.REDIRECT_URI)); byte[] bytes = new byte[STATE_LENGTH]; secureRandom.nextBytes(bytes);
protected AGResponse getAuthorizationGrant(AGRequest agRequest) { List<Map.Entry<String, String>> params = MapUtilities.toList(agRequest.getParameters()); OAClient oac = (OAClient) agRequest.getClient(); OAuthAccessor accessor = OAuthUtilities.createOAuthAccessor(this, oac); if (oac.getSignatureMethod().equals(RSA_SHA1)) { if (!((OAClient) agRequest.getClient()).getSignatureMethod().equals(RSA_SHA1) && (rtss == null || rtss.length() == 0)) { throw new IllegalArgumentException("Error: delegation server did not return a shared secret");