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

bugfix(accessTokenGenerator login issue): updated body and url for ge… #76

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from
Open
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 @@ -63,12 +63,12 @@ private void generateToken() {
MediaType mediaType = MediaType.parse("application/json");
Log.d(TAG, "generateToken: sub: " + sub);
Log.d(TAG, "generateToken: nbf: " + nbf);
RequestBody body = RequestBody.create(mediaType, "{\n \"iss\": \"MAY2RJNZKZNJMWOTG4NT\",\n \"sub\": \"" + sub + "\",\n \"per\": {\n \"voice\": {\n \"incoming_allow\": true,\n \"outgoing_allow\": true\n }\n },\n \"exp\": " + exp + "\n}\n");
RequestBody body = RequestBody.create(mediaType, "{\n \"iss\": \"MAMTDLMDHIMDYXMTK5NT\",\n \"sub\": \""+ sub +"\",\n \"per\": {\n \"voice\": {\n \"incoming_allow\": true,\n \"outgoing_allow\": true\n }\n }}");
Request request = new Request.Builder()
.url("https://api.plivo.com/v1/Account/MAY2RJNZKZNJMWOTG4NT/JWT/Token")
.url("https://api.plivo.com/v1/Account/MAMTDLMDHIMDYXMTK5NT/JWT/Token")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Basic TUFZMlJKTlpLWk5KTVdPVEc0TlQ6WWpJM1pXVmpPV0poTW1Kak5USXhNakJtTkdJeVlUUmtZVGd3TUdSaA==")
.addHeader("Authorization", "Basic TUFNVERMTURISU1EWVhNVEs1TlQ6TlRNMk16UTJZbVU0Tm1GaE1EWmtZakV5T0RnMU1qRXdZVE0wT1dZMQ==")
.build();
try {
/*runOnUiThread(() -> {
Expand Down