changed Rest API call Open edX from JWT to Beater token

This commit is contained in:
anhefti 2019-05-21 11:28:13 +02:00
parent 3a2a7847ee
commit fc07b5b80c

View file

@ -318,7 +318,7 @@ final class OpenEdxLmsAPITemplate implements LmsAPITemplate {
final MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
params.add("grant_type", "client_credentials");
params.add("token_type", "jwt");
//params.add("token_type", "jwt");
params.add("client_id", resource.getClientId());
params.add("client_secret", resource.getClientSecret());
@ -340,7 +340,9 @@ final class OpenEdxLmsAPITemplate implements LmsAPITemplate {
throw new AccessTokenRequiredException(resource);
}
request.getHeaders().set("Authorization", String.format("%s %s", "JWT:", accessToken.getValue()));
request.getHeaders().set("Authorization", String.format("%s %s", "Bearer", accessToken.getValue()));
//request.getHeaders().set("Authorization", String.format("%s %s", "JWT", accessToken.getValue()));
}
}