updated jwe, jwt, and jwk models to have new parameters that were released in latest JOSE update
parent
70e90bc4c1
commit
bc1ff0d964
|
@ -19,6 +19,8 @@ public class JweHeader extends JwtHeader{
|
|||
public static final String X509_CERTIFICATE_THUMBPRINT = "x5t";
|
||||
public static final String X509_CERTIFICATE_CHAIN = "x5c";
|
||||
public static final String KEY_ID = "kid";
|
||||
public static final String KEY_DERIVATION_FUNCTION = "kdf";
|
||||
public static final String CONTENT_TYPE = "cty";
|
||||
|
||||
public JweHeader(){
|
||||
super();
|
||||
|
@ -109,6 +111,14 @@ public class JweHeader extends JwtHeader{
|
|||
public String getKeyId() {
|
||||
return KEY_ID;
|
||||
}
|
||||
|
||||
public static String getKeyDerivationFunction() {
|
||||
return KEY_DERIVATION_FUNCTION;
|
||||
}
|
||||
|
||||
public static String getContentType() {
|
||||
return CONTENT_TYPE;
|
||||
}
|
||||
|
||||
public void setIv(String iv) {
|
||||
setClaim(INITIALIZATION_VECTOR, iv);
|
||||
|
@ -149,4 +159,12 @@ public class JweHeader extends JwtHeader{
|
|||
public void setKeyId(String kid) {
|
||||
setClaim(KEY_ID, kid);
|
||||
}
|
||||
|
||||
public void setKeyDerivationFunction(String kdf) {
|
||||
setClaim(KEY_DERIVATION_FUNCTION, kdf);
|
||||
}
|
||||
|
||||
public void setContentType(String cty) {
|
||||
setClaim(CONTENT_TYPE, cty);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ public class JwtHeader extends ClaimSet {
|
|||
public static final String TYPE = "typ";
|
||||
public static final String ALGORITHM = "alg";
|
||||
public static final String ENCRYPTION_METHOD = "enc";
|
||||
public static final String CONTENT_TYPE = "cty";
|
||||
|
||||
/**
|
||||
* Make an empty header
|
||||
|
@ -119,4 +120,12 @@ public class JwtHeader extends ClaimSet {
|
|||
setClaim(ENCRYPTION_METHOD, encryptionMethod);
|
||||
}
|
||||
|
||||
public static String getContentType() {
|
||||
return CONTENT_TYPE;
|
||||
}
|
||||
|
||||
public void setContentType(String cty) {
|
||||
setClaim(CONTENT_TYPE, cty);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue