-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from jebbench/master
Add an interface for JWTVerifier.
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
lib/src/main/java/com/auth0/jwt/interfaces/JWTVerifier.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,16 @@ | ||
package com.auth0.jwt.interfaces; | ||
|
||
import com.auth0.jwt.exceptions.JWTVerificationException; | ||
|
||
|
||
public interface JWTVerifier { | ||
|
||
/** | ||
* Performs the verification against the given Token | ||
* | ||
* @param token to verify. | ||
* @return a verified and decoded JWT. | ||
* @throws JWTVerificationException if any of the verification steps fail | ||
*/ | ||
DecodedJWT verify(String token) throws JWTVerificationException; | ||
} |