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_THUMBPRINT = "x5t";
|
||||||
public static final String X509_CERTIFICATE_CHAIN = "x5c";
|
public static final String X509_CERTIFICATE_CHAIN = "x5c";
|
||||||
public static final String KEY_ID = "kid";
|
public static final String KEY_ID = "kid";
|
||||||
|
public static final String KEY_DERIVATION_FUNCTION = "kdf";
|
||||||
|
public static final String CONTENT_TYPE = "cty";
|
||||||
|
|
||||||
public JweHeader(){
|
public JweHeader(){
|
||||||
super();
|
super();
|
||||||
|
@ -110,6 +112,14 @@ public class JweHeader extends JwtHeader{
|
||||||
return KEY_ID;
|
return KEY_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getKeyDerivationFunction() {
|
||||||
|
return KEY_DERIVATION_FUNCTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getContentType() {
|
||||||
|
return CONTENT_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
public void setIv(String iv) {
|
public void setIv(String iv) {
|
||||||
setClaim(INITIALIZATION_VECTOR, iv);
|
setClaim(INITIALIZATION_VECTOR, iv);
|
||||||
}
|
}
|
||||||
|
@ -149,4 +159,12 @@ public class JweHeader extends JwtHeader{
|
||||||
public void setKeyId(String kid) {
|
public void setKeyId(String kid) {
|
||||||
setClaim(KEY_ID, 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 TYPE = "typ";
|
||||||
public static final String ALGORITHM = "alg";
|
public static final String ALGORITHM = "alg";
|
||||||
public static final String ENCRYPTION_METHOD = "enc";
|
public static final String ENCRYPTION_METHOD = "enc";
|
||||||
|
public static final String CONTENT_TYPE = "cty";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make an empty header
|
* Make an empty header
|
||||||
|
@ -119,4 +120,12 @@ public class JwtHeader extends ClaimSet {
|
||||||
setClaim(ENCRYPTION_METHOD, encryptionMethod);
|
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