changed Rest API call Open edX from JWT to Beater token
This commit is contained in:
parent
3a2a7847ee
commit
fc07b5b80c
1 changed files with 4 additions and 2 deletions
|
@ -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()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue