-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
db157eb
commit 4f441de
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/java/org/irods/jargon/irodsext/jwt/JwtIssueService.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,31 @@ | ||
package org.irods.jargon.irodsext.jwt; | ||
|
||
import io.jsonwebtoken.Claims; | ||
import io.jsonwebtoken.Jws; | ||
|
||
/** | ||
* Interface for a service to (with proper configuration) issue JWTs for use | ||
* with plug-in microservices | ||
* | ||
* @author Mike Conway - NIEHS | ||
* | ||
*/ | ||
public interface JwtIssueService { | ||
|
||
/** | ||
* Given a subject, issue a proper JWT that can be understood by Metalnx plugins | ||
* | ||
* @param subject {@code String} with the subject for the JWT claim | ||
* @return {@code String} with the JWT token | ||
*/ | ||
String issueJwtToken(String subject); | ||
|
||
/** | ||
* Given a JWT token, return the decoded claims | ||
* | ||
* @param token {@code String} with the JWT token | ||
* @return {@link Jws} with the associated claims | ||
*/ | ||
Jws<Claims> decodeJwtToken(String token); | ||
|
||
} |
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,3 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|