Skip to content

Commit 947f7d6

Browse files
authored
fixes #132 update iam dependency in pom.xml (#133)
1 parent eee2dbe commit 947f7d6

4 files changed

Lines changed: 11 additions & 12 deletions

File tree

custom-runtime/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
<artifactId>aws-lambda-java-events</artifactId>
4444
</dependency>
4545
<dependency>
46-
<groupId>com.amazonaws</groupId>
47-
<artifactId>aws-java-sdk-iam</artifactId>
46+
<groupId>software.amazon.awssdk</groupId>
47+
<artifactId>iam</artifactId>
4848
</dependency>
4949
<dependency>
5050
<groupId>ch.qos.logback</groupId>

jwt-authorizer/Authorizer/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<version.encoder>1.2.3</version.encoder>
1919
<version.lambda-core>1.2.3</version.lambda-core>
2020
<version.lambda-events>3.15.0</version.lambda-events>
21-
<version.lambda-iam>1.12.745</version.lambda-iam>
21+
<version.lambda-awssdk>2.31.2</version.lambda-awssdk>
2222
<version.jose4j>0.9.6</version.jose4j>
2323
<version.logback>1.5.16</version.logback>
2424
<version.junit>5.11.3</version.junit>
@@ -64,9 +64,9 @@
6464
<version>${version.lambda-events}</version>
6565
</dependency>
6666
<dependency>
67-
<groupId>com.amazonaws</groupId>
68-
<artifactId>aws-java-sdk-iam</artifactId>
69-
<version>${version.lambda-iam}</version>
67+
<groupId>software.amazon.awssdk</groupId>
68+
<artifactId>iam</artifactId>
69+
<version>${version.lambda-awssdk}</version>
7070
</dependency>
7171
<dependency>
7272
<groupId>com.fasterxml.jackson.core</groupId>

jwt-authorizer/Authorizer/src/main/java/com/networknt/aws/lambda/Authorizer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.amazonaws.services.lambda.runtime.Context;
44
import com.amazonaws.services.lambda.runtime.RequestHandler;
55
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
6-
import com.fasterxml.jackson.core.JsonProcessingException;
76
import com.fasterxml.jackson.databind.ObjectMapper;
87
import com.networknt.config.JsonMapper;
98
import com.networknt.utility.Constants;
@@ -55,11 +54,11 @@ public AuthPolicy handleRequest(APIGatewayProxyRequestEvent request, Context con
5554
// handle the primary token.
5655
String clientId = claims.getStringClaimValue(Constants.CLIENT_ID_STRING);
5756
// try to get the cid as some OAuth tokens name it as cid like Okta.
58-
if(clientId == null) clientId = claims.getStringClaimValue(Constants.CID_STRING);
57+
if(clientId == null) clientId = claims.getStringClaimValue(Constants.CID);
5958
ctx.put(Constants.CLIENT_ID_STRING, clientId);
6059
String userId = claims.getStringClaimValue(Constants.USER_ID_STRING);
6160
// try to get the uid as some OAuth tokens name it as uid like Okta.
62-
if(userId == null) userId = claims.getStringClaimValue(Constants.UID_STRING);
61+
if(userId == null) userId = claims.getStringClaimValue(Constants.UID);
6362
if(userId != null) {
6463
ctx.put(Constants.USER_ID_STRING, userId);
6564
principalId = userId;

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@
298298
<version>${version.lambda-events}</version>
299299
</dependency>
300300
<dependency>
301-
<groupId>com.amazonaws</groupId>
302-
<artifactId>aws-java-sdk-iam</artifactId>
303-
<version>${version.lambda-iam}</version>
301+
<groupId>software.amazon.awssdk</groupId>
302+
<artifactId>iam</artifactId>
303+
<version>${version.lambda-awssdk}</version>
304304
</dependency>
305305
<dependency>
306306
<groupId>software.amazon.awssdk</groupId>

0 commit comments

Comments
 (0)