jwt token Issuer, also in verification
This commit is contained in:
parent
434e0ddea6
commit
8b90a99823
2 changed files with 5 additions and 2 deletions
|
@ -43,8 +43,7 @@ public class Client extends Thread{
|
|||
.setRequireExpirationTime()
|
||||
.setAllowedClockSkewInSeconds(30)
|
||||
.setRequireSubject()
|
||||
.setExpectedIssuer("Issuer")
|
||||
.setExpectedAudience("Audience")
|
||||
.setExpectedIssuer(this.router.getTokenIssuer())
|
||||
.setVerificationKey(this.router.getWebKey().getKey())
|
||||
.setJwsAlgorithmConstraints(
|
||||
ConstraintType.PERMIT, AlgorithmIdentifiers.RSA_USING_SHA256)
|
||||
|
|
|
@ -57,6 +57,10 @@ public class Router{
|
|||
return this.rsaJsonWebKey;
|
||||
}
|
||||
|
||||
public String getTokenIssuer(){
|
||||
return this.token_issuer;
|
||||
}
|
||||
|
||||
public String createAuthUser(int id) throws JoseException{
|
||||
JwtClaims claims = new JwtClaims();
|
||||
claims.setIssuer(token_issuer); // who creates the token and signs it
|
||||
|
|
Loading…
Add table
Reference in a new issue