Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #49 from carne-iot/0.0.6.RELEASE
Browse files Browse the repository at this point in the history
0.0.6.release
  • Loading branch information
juanmbellini committed Nov 22, 2017
2 parents e2c54ca + ddacc9d commit f512805
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>ar.edu.itba.iot.carne-iot</groupId>
<artifactId>server</artifactId>
<version>0.0.5.RELEASE</version>
<version>0.0.6.RELEASE</version>
<packaging>pom</packaging>
<name>${project.groupId}:${project.artifactId}</name>

Expand Down
2 changes: 1 addition & 1 deletion server-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>ar.edu.itba.iot.carne-iot</groupId>
<artifactId>server</artifactId>
<version>0.0.5.RELEASE</version>
<version>0.0.6.RELEASE</version>
</parent>

<artifactId>server-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion server-persistence-interfaces/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>ar.edu.itba.iot.carne-iot</groupId>
<artifactId>server</artifactId>
<version>0.0.5.RELEASE</version>
<version>0.0.6.RELEASE</version>
</parent>

<artifactId>server-persistence-interfaces</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion server-persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>ar.edu.itba.iot.carne-iot</groupId>
<artifactId>server</artifactId>
<version>0.0.5.RELEASE</version>
<version>0.0.6.RELEASE</version>
</parent>

<artifactId>server-persistence</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion server-services-interfaces/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>ar.edu.itba.iot.carne-iot</groupId>
<artifactId>server</artifactId>
<version>0.0.5.RELEASE</version>
<version>0.0.6.RELEASE</version>
</parent>

<artifactId>server-services-interfaces</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion server-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>ar.edu.itba.iot.carne-iot</groupId>
<artifactId>server</artifactId>
<version>0.0.5.RELEASE</version>
<version>0.0.6.RELEASE</version>
</parent>

<artifactId>server-services</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion server-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>ar.edu.itba.iot.carne-iot</groupId>
<artifactId>server</artifactId>
<version>0.0.5.RELEASE</version>
<version>0.0.6.RELEASE</version>
</parent>

<artifactId>server-webapp</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ public JwtTokenData compile(String rawToken) throws IllegalArgumentException {
final String username = claims.getSubject();

if (roles.contains(Role.ROLE_DEVICE)) {
final long deviceId = (long) claims.get(DEVICE_ID_CLAIMS_NAME);
final Object deviceIdObject = claims.get(DEVICE_ID_CLAIMS_NAME);
if (!(deviceIdObject instanceof Number)) {
throw new MalformedJwtException("The \"device id\" claim must be a number");
}
final long deviceId = ((Number) deviceIdObject).longValue();
return new DeviceJwtTokenData(userId, username, roles, deviceId);
}
checkJwtBlacklist(userId, jti); // Device tokens are not blacklisted
Expand Down

0 comments on commit f512805

Please sign in to comment.