-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...zation/src/main/java/eu/solven/kumite/oauth2/authorizationserver/ActiveRefreshTokens.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package eu.solven.kumite.oauth2.authorizationserver; | ||
|
||
import java.util.Map; | ||
import java.util.Set; | ||
import java.util.UUID; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
import java.util.concurrent.ConcurrentSkipListSet; | ||
|
||
public class ActiveRefreshTokens { | ||
final Map<UUID, Set<UUID>> accountIdToJti = new ConcurrentHashMap<>(); | ||
|
||
public void touchRefreshToken(UUID accountId, UUID jti) { | ||
accountIdToJti.computeIfAbsent(accountId, k -> new ConcurrentSkipListSet<>()).add(jti); | ||
} | ||
|
||
public Set<UUID> getActiveTokens(UUID accountId) { | ||
return accountIdToJti.getOrDefault(accountId, Set.of()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<profiles> | ||
<profile> | ||
<!-- https://devcenter.heroku.com/articles/using-a-custom-maven-settings-xml --> | ||
<id>heroku</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<!-- https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/279 --> | ||
<!-- https://gist.github.com/tmullin/bd17e3a05607d2b11349ef73ebbca84d --> | ||
<maven.gitcommitid.skip>true</maven.gitcommitid.skip> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</settings> |