Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: brazilob jarm fapi conformance test last7 issues #695

Merged
merged 1 commit into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import io.jans.as.client.page.PageConfig;
import io.jans.as.client.par.ParClient;
import io.jans.as.client.par.ParRequest;
import io.jans.as.model.common.GrantType;
import io.jans.as.model.common.ResponseMode;
import io.jans.as.model.common.ResponseType;
import io.jans.as.model.common.SubjectType;
Expand Down Expand Up @@ -1166,6 +1167,41 @@ public RegisterResponse registerClient(

return registerResponse;
}

public RegisterResponse registerClient(final String redirectUris, final List<ResponseType> responseTypes,
final List<GrantType> grantTypes, final String sectorIdentifierUri, final String clientJwksUri,
final SignatureAlgorithm signatureAlgorithm, final KeyEncryptionAlgorithm keyEncryptionAlgorithm,
final BlockEncryptionAlgorithm blockEncryptionAlgorithm) {
RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "jans test app",
io.jans.as.model.util.StringUtils.spaceSeparatedToList(redirectUris));
registerRequest.setResponseTypes(responseTypes);
registerRequest.setGrantTypes(grantTypes);
registerRequest.setSectorIdentifierUri(sectorIdentifierUri);
registerRequest.setJwksUri(clientJwksUri);
registerRequest.setAuthorizationSignedResponseAlg(signatureAlgorithm);
registerRequest.setAuthorizationEncryptedResponseAlg(keyEncryptionAlgorithm);
registerRequest.setAuthorizationEncryptedResponseEnc(blockEncryptionAlgorithm);
registerRequest.setRequestObjectSigningAlg(signatureAlgorithm);
registerRequest.setRequestObjectEncryptionAlg(keyEncryptionAlgorithm);
registerRequest.setRequestObjectEncryptionEnc(blockEncryptionAlgorithm);
registerRequest.setUserInfoSignedResponseAlg(signatureAlgorithm);
registerRequest.setUserInfoEncryptedResponseAlg(keyEncryptionAlgorithm);
registerRequest.setUserInfoEncryptedResponseEnc(blockEncryptionAlgorithm);

RegisterClient registerClient = new RegisterClient(registrationEndpoint);
registerClient.setRequest(registerRequest);
RegisterResponse registerResponse = registerClient.exec();

showClient(registerClient);
assertEquals(registerResponse.getStatus(), 201, "Unexpected response code: " + registerResponse.getEntity());
assertNotNull(registerResponse.getClientId());
assertNotNull(registerResponse.getClientSecret());
assertNotNull(registerResponse.getRegistrationAccessToken());
assertNotNull(registerResponse.getClientIdIssuedAt());
assertNotNull(registerResponse.getClientSecretExpiresAt());

return registerResponse;
}

public AuthorizationResponse authorizationRequest(
final List<ResponseType> responseTypes, final ResponseMode responseMode, final ResponseMode expectedResponseMode,
Expand Down
Loading