-
Notifications
You must be signed in to change notification settings - Fork 931
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK-3231] Added support for multiple checks on a single claim (#573)
* Added support for multiple checks on a single claim * Fix codecov CI failure * Allow pseudo comparison for codecov * Remove newly added parameters and check codecov disabled * Reenabled changes check in codecov * Trigger Build * Refactor ExpectedCheckHolder from interfaces to impl package * Refactored code to improve coverage report
- Loading branch information
Showing
3 changed files
with
282 additions
and
137 deletions.
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
25 changes: 25 additions & 0 deletions
25
lib/src/main/java/com/auth0/jwt/impl/ExpectedCheckHolder.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,25 @@ | ||
package com.auth0.jwt.impl; | ||
|
||
import com.auth0.jwt.interfaces.Claim; | ||
import com.auth0.jwt.interfaces.DecodedJWT; | ||
|
||
/** | ||
* This holds the checks that are run to verify a JWT. | ||
*/ | ||
public interface ExpectedCheckHolder { | ||
/** | ||
* The claim name that will be checked. | ||
* | ||
* @return the claim name | ||
*/ | ||
String getClaimName(); | ||
|
||
/** | ||
* The verification that will be run. | ||
* | ||
* @param claim the claim for which verification is done | ||
* @param decodedJWT the JWT on which verification is done | ||
* @return whether the verification passed or not | ||
*/ | ||
boolean verify(Claim claim, DecodedJWT decodedJWT); | ||
} |
Oops, something went wrong.