Skip to content

Commit

Permalink
Client Credentials Grant : support authentication by keys (private/pu…
Browse files Browse the repository at this point in the history
…blic ) #88
  • Loading branch information
qbert2k committed Nov 9, 2015
1 parent d7555d9 commit ade5a3c
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ public class ClientCredentialsGrantHttpTest extends BaseTest {
public void defaultAuthenticationMethod(final String redirectUris) throws Exception {
showTitle("defaultAuthenticationMethod");

List<ResponseType> responseTypes = new ArrayList<ResponseType>();
List<String> scopes = Arrays.asList("clientinfo");

// 1. Register client
RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
StringUtils.spaceSeparatedToList(redirectUris));
registerRequest.setResponseTypes(responseTypes);
registerRequest.setScopes(scopes);

RegisterClient registerClient = new RegisterClient(registrationEndpoint);
Expand Down Expand Up @@ -88,13 +86,11 @@ public void defaultAuthenticationMethod(final String redirectUris) throws Except
public void clientSecretBasicAuthenticationMethod(final String redirectUris) throws Exception {
showTitle("clientSecretBasicAuthenticationMethod");

List<ResponseType> responseTypes = new ArrayList<ResponseType>();
List<String> scopes = Arrays.asList("clientinfo");

// 1. Register client
RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
StringUtils.spaceSeparatedToList(redirectUris));
registerRequest.setResponseTypes(responseTypes);
registerRequest.setScopes(scopes);
registerRequest.setTokenEndpointAuthMethod(AuthenticationMethod.CLIENT_SECRET_BASIC);

Expand Down Expand Up @@ -149,13 +145,11 @@ public void clientSecretBasicAuthenticationMethod(final String redirectUris) thr
public void clientSecretPostAuthenticationMethod(final String redirectUris) throws Exception {
showTitle("clientSecretPostAuthenticationMethod");

List<ResponseType> responseTypes = new ArrayList<ResponseType>();
List<String> scopes = Arrays.asList("clientinfo");

// 1. Register client
RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
StringUtils.spaceSeparatedToList(redirectUris));
registerRequest.setResponseTypes(responseTypes);
registerRequest.setScopes(scopes);
registerRequest.setTokenEndpointAuthMethod(AuthenticationMethod.CLIENT_SECRET_POST);

Expand Down Expand Up @@ -210,13 +204,11 @@ public void clientSecretPostAuthenticationMethod(final String redirectUris) thro
public void clientSecretJwtAuthenticationMethod(final String redirectUris, final String sectorIdentifierUri) throws Exception {
showTitle("clientSecretJwtAuthenticationMethod");

List<ResponseType> responseTypes = new ArrayList<ResponseType>();
List<String> scopes = Arrays.asList("clientinfo");

// 1. Register client
RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
StringUtils.spaceSeparatedToList(redirectUris));
registerRequest.setResponseTypes(responseTypes);
registerRequest.setScopes(scopes);
registerRequest.setTokenEndpointAuthMethod(AuthenticationMethod.CLIENT_SECRET_JWT);
registerRequest.setSectorIdentifierUri(sectorIdentifierUri);
Expand Down Expand Up @@ -275,13 +267,11 @@ public void privateKeyJwtAuthenticationMethod(final String redirectUris, final S
final String privateExponent) throws Exception {
showTitle("privateKeyJwtAuthenticationMethod");

List<ResponseType> responseTypes = new ArrayList<ResponseType>();
List<String> scopes = Arrays.asList("clientinfo");

// 1. Register client
RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
StringUtils.spaceSeparatedToList(redirectUris));
registerRequest.setResponseTypes(responseTypes);
registerRequest.setScopes(scopes);
registerRequest.setTokenEndpointAuthMethod(AuthenticationMethod.PRIVATE_KEY_JWT);
registerRequest.setSectorIdentifierUri(sectorIdentifierUri);
Expand Down

0 comments on commit ade5a3c

Please sign in to comment.