Skip to content

Commit

Permalink
Remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaiyarasiganeshalingam committed Aug 15, 2023
1 parent 5cd72c6 commit 506cade
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stdlib-integration-tests/oauth2/tests/oauth2_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
// under the License.

import ballerina/http;
import ballerina/lang.regexp;
import ballerina/test;
import ballerina/io;

listener http:Listener oauth2Listener = new(25003, {
secureSocket: {
Expand Down Expand Up @@ -94,9 +94,14 @@ service /oauth2 on authorizationServer {
string|http:ClientError payload = request.getTextPayload();
if (payload is string) {
string[] parts = re `&`.split(payload);
io:println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
io:println(payload);
io:println(parts.toBalString());
foreach string part in parts {
if (part.indexOf("token=") is int) {
io:println("part: " + part);
string token = re `=`.split(part)[1];
io:println("Token: " + token);
if (token == ACCESS_TOKEN) {
json response = { "active": true, "exp": 3600, "scp": "read write" };
return response;
Expand Down

0 comments on commit 506cade

Please sign in to comment.