Skip to content

Commit 4218020

Browse files
java-basic-authorizer-apigw-fn-example added
1 parent fd1c54a commit 4218020

File tree

2 files changed

+3
-3
lines changed
  • app-dev/devops-and-containers/functions/java-basic-authorizer-apigw-fn-example

2 files changed

+3
-3
lines changed

app-dev/devops-and-containers/functions/java-basic-authorizer-apigw-fn-example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ aGk6aGk=,Zm9vOmJhcg==
6666
<p>
6767
(You can modify the config by adding new pairs as you like and remove the existing ones)
6868
<p>
69-
After deploing the functions add an API Gateway instance and configure the Functions:
69+
After deploying the functions add an API Gateway instance and configure the Functions:
7070

7171
<p>
7272
<img src="files/authorizer-function.png" width="800" />

app-dev/devops-and-containers/functions/java-basic-authorizer-apigw-fn-example/files/fn-authorizer-auth-basic/src/main/java/com/example/fn/HelloFunction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ public String handleRequest(final HTTPGatewayContext hctx, final InputEvent inpu
7777
ret = "{ " +
7878
"\"active\": true," +
7979
"\"principal\": \"myprincipal\"," +
80-
"\"scope\": [\"fnsimplejava\"]," +
80+
"\"scope\": [\"fnbasicauthtest\"]," +
8181
"\"expiresAt\": \"" + expiryDate + "\"," +
8282
"\"context\": { \"username\": \"" + username + "\" }" +
8383
" }";
8484
} else {
8585
ret = "{ " +
8686
"\"active\": false," +
87-
"\"wwwAuthenticate\": \"Basic realm=\\\"fnsimplejava.com\\\"\"" +
87+
"\"wwwAuthenticate\": \"Basic realm=\\\"fnbasicauthtest.io\\\"\"" +
8888
" }";
8989
}
9090
System.out.println(ret);

0 commit comments

Comments
 (0)