Skip to content

Commit 90fb5a0

Browse files
authored
[SDK-4763] - Add support for HRI Management API changes (#635)
1 parent c050bf2 commit 90fb5a0

19 files changed

Lines changed: 724 additions & 12 deletions

src/main/java/com/auth0/json/mgmt/client/Client.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ public class Client {
9696
private Boolean requiresPushedAuthorizationRequests;
9797
@JsonProperty("oidc_backchannel_logout")
9898
private OIDCBackchannelLogout oidcBackchannelLogout;
99+
@JsonProperty("signed_request_object")
100+
private SignedRequest signedRequest;
101+
@JsonProperty("compliance_level")
102+
private String complianceLevel;
99103

100104
/**
101105
* Getter for the name of the tenant this client belongs to.
@@ -837,5 +841,36 @@ public OIDCBackchannelLogout getOidcBackchannelLogout() {
837841
public void setOidcBackchannelLogout(OIDCBackchannelLogout oidcBackchannelLogout) {
838842
this.oidcBackchannelLogout = oidcBackchannelLogout;
839843
}
844+
845+
/**
846+
* @return the value of the {@code signed_request_object} field.
847+
*/
848+
public SignedRequest getSignedRequest() {
849+
return signedRequest;
850+
}
851+
852+
/**
853+
* Sets the value of the {@code SignedRequest} field.
854+
*
855+
* @param signedRequest the value to set the {@code signed_request_field} field to.
856+
*/
857+
public void setSignedRequest(SignedRequest signedRequest) {
858+
this.signedRequest = signedRequest;
859+
}
860+
861+
/**
862+
* @return the value of the {@code compliance_level} field
863+
*/
864+
public String getComplianceLevel() {
865+
return complianceLevel;
866+
}
867+
868+
/**
869+
* Sets the value of the {@code compliance_level} field
870+
* @param complianceLevel the value of the {@code compliance_level} field
871+
*/
872+
public void setComplianceLevel(String complianceLevel) {
873+
this.complianceLevel = complianceLevel;
874+
}
840875
}
841876

src/main/java/com/auth0/json/mgmt/client/ClientAuthenticationMethods.java

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,59 @@ public class ClientAuthenticationMethods {
1313

1414
@JsonProperty("private_key_jwt")
1515
private PrivateKeyJwt privateKeyJwt;
16+
@JsonProperty("self_signed_tls_client_auth")
17+
private SelfSignedTLSClientAuth selfSignedTLSClientAuth;
18+
@JsonProperty("tls_client_auth")
19+
private TLSClientAuth tlsClientAuth;
1620

1721
public ClientAuthenticationMethods() {
1822

1923
}
2024

25+
/**
26+
* Create a new instance.
27+
* @param privateKeyJwt the value of the {@code private_key_jwt} field.
28+
*/
2129
public ClientAuthenticationMethods(PrivateKeyJwt privateKeyJwt) {
30+
this(privateKeyJwt, null, null);
31+
}
32+
33+
/**
34+
* Create a new instance.
35+
* @param privateKeyJwt the value of the {@code private_key_jwt} field.
36+
* @param selfSignedTLSClientAuth the value of the {@code self_signed_tls_client_auth} field.
37+
*/
38+
public ClientAuthenticationMethods(PrivateKeyJwt privateKeyJwt, SelfSignedTLSClientAuth selfSignedTLSClientAuth) {
39+
this(privateKeyJwt, selfSignedTLSClientAuth, null);
40+
}
41+
42+
/**
43+
* Create a new instance.
44+
* @param privateKeyJwt the value of the {@code private_key_jwt} field.
45+
* @param selfSignedTLSClientAuth the value of the {@code self_signed_tls_client_auth} field.
46+
* @param tlsClientAuth the value of the {@code tls_client_auth} field.
47+
*/
48+
public ClientAuthenticationMethods(PrivateKeyJwt privateKeyJwt, SelfSignedTLSClientAuth selfSignedTLSClientAuth, TLSClientAuth tlsClientAuth) {
2249
this.privateKeyJwt = privateKeyJwt;
50+
this.selfSignedTLSClientAuth = selfSignedTLSClientAuth;
51+
this.tlsClientAuth = tlsClientAuth;
2352
}
2453

2554
public PrivateKeyJwt getPrivateKeyJwt() {
2655
return privateKeyJwt;
2756
}
57+
58+
/**
59+
* @return the value of the {@code self_signed_tls_client_auth} field
60+
*/
61+
public SelfSignedTLSClientAuth getSelfSignedTLSClientAuth() {
62+
return selfSignedTLSClientAuth;
63+
}
64+
65+
/**
66+
* @return the value of the {@code tls_client_auth} field
67+
*/
68+
public TLSClientAuth getTlsClientAuth() {
69+
return tlsClientAuth;
70+
}
2871
}

src/main/java/com/auth0/json/mgmt/client/Credential.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public class Credential {
3131
private String alg;
3232
@JsonProperty("parse_expiry_from_cert")
3333
private Boolean parseExpiryFromCert;
34+
@JsonProperty("subject_dn")
35+
private String subjectDn;
3436
@JsonFormat(shape = JsonFormat.Shape.STRING)
3537
@JsonProperty("created_at")
3638
private Date createdAt;
@@ -188,4 +190,19 @@ public Boolean getParseExpiryFromCert() {
188190
public void setParseExpiryFromCert(Boolean parseExpiryFromCert) {
189191
this.parseExpiryFromCert = parseExpiryFromCert;
190192
}
193+
194+
/**
195+
* @return the value of the {@code subject_dn} field
196+
*/
197+
public String getSubjectDn() {
198+
return subjectDn;
199+
}
200+
201+
/**
202+
* Sets the value of the {@code subject_dn} field
203+
* @param subjectDn the value of the {@code subject_dn} field
204+
*/
205+
public void setSubjectDn(String subjectDn) {
206+
this.subjectDn = subjectDn;
207+
}
191208
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.auth0.json.mgmt.client;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonInclude;
5+
import com.fasterxml.jackson.annotation.JsonProperty;
6+
7+
import java.util.List;
8+
9+
/**
10+
* Class that represents an Auth0 Application self-signed TLS client authentication method. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity.
11+
*/
12+
13+
@JsonIgnoreProperties(ignoreUnknown = true)
14+
@JsonInclude(JsonInclude.Include.NON_NULL)
15+
public class SelfSignedTLSClientAuth {
16+
17+
@JsonProperty("credentials")
18+
private List<Credential> credentials;
19+
20+
/**
21+
* Create a new instance
22+
* @param credentials the credentials to use
23+
*/
24+
public SelfSignedTLSClientAuth(@JsonProperty("credentials") List<Credential> credentials) {
25+
this.credentials = credentials;
26+
}
27+
28+
/**
29+
* @return the credentials
30+
*/
31+
public List<Credential> getCredentials() {
32+
return credentials;
33+
}
34+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package com.auth0.json.mgmt.client;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonInclude;
5+
import com.fasterxml.jackson.annotation.JsonProperty;
6+
7+
import java.util.List;
8+
9+
/**
10+
* Class that represents an Auth0 Application signed request object. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity.
11+
*/
12+
@JsonIgnoreProperties(ignoreUnknown = true)
13+
@JsonInclude(JsonInclude.Include.NON_NULL)
14+
public class SignedRequest {
15+
16+
@JsonProperty("required")
17+
private Boolean required;
18+
@JsonProperty("credentials")
19+
private List<Credential> credentials;
20+
21+
/**
22+
* @return the value of the {@code credentials} field
23+
*/
24+
public List<Credential> getCredentials() {
25+
return credentials;
26+
}
27+
28+
/**
29+
* Sets the value of the {@code credentials} field
30+
*
31+
* @param credentials the value of the {@code credentials} field
32+
*/
33+
public void setCredentials(List<Credential> credentials) {
34+
this.credentials = credentials;
35+
}
36+
37+
public Boolean getRequired() {
38+
return required;
39+
}
40+
41+
public void setRequired(Boolean required) {
42+
this.required = required;
43+
}
44+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.auth0.json.mgmt.client;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonInclude;
5+
import com.fasterxml.jackson.annotation.JsonProperty;
6+
7+
import java.util.List;
8+
9+
/**
10+
* Class that represents an Auth0 Application TLS client authentication method. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity.
11+
*/
12+
@JsonIgnoreProperties(ignoreUnknown = true)
13+
@JsonInclude(JsonInclude.Include.NON_NULL)
14+
public class TLSClientAuth {
15+
@JsonProperty("credentials")
16+
private List<Credential> credentials;
17+
18+
/**
19+
* Create a new instance
20+
* @param credentials the credentials to use
21+
*/
22+
public TLSClientAuth(@JsonProperty("credentials") List<Credential> credentials) {
23+
this.credentials = credentials;
24+
}
25+
26+
/**
27+
* @return the credentials
28+
*/
29+
public List<Credential> getCredentials() {
30+
return credentials;
31+
}
32+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.auth0.json.mgmt.resourceserver;
2+
3+
import com.fasterxml.jackson.annotation.JsonCreator;
4+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
5+
import com.fasterxml.jackson.annotation.JsonInclude;
6+
import com.fasterxml.jackson.annotation.JsonProperty;
7+
8+
/**
9+
* Class that represents the authorization details associated with a {@link ResourceServer}
10+
*/
11+
@JsonIgnoreProperties(ignoreUnknown = true)
12+
@JsonInclude(JsonInclude.Include.NON_NULL)
13+
public class AuthorizationDetails {
14+
15+
@JsonProperty("type")
16+
private String type;
17+
18+
/**
19+
* Create a new instance.
20+
* @param type the value of the {@code type} field.
21+
*/
22+
@JsonCreator
23+
public AuthorizationDetails(@JsonProperty("type") String type) {
24+
this.type = type;
25+
}
26+
27+
/**
28+
* @return the value of the {@code type} field
29+
*/
30+
public String getType() {
31+
return type;
32+
}
33+
}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
package com.auth0.json.mgmt.resourceserver;
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
import com.fasterxml.jackson.annotation.JsonInclude;
5+
import com.fasterxml.jackson.annotation.JsonProperty;
6+
7+
/**
8+
* Class that represents the encryption key associated with a {@link TokenEncryption}
9+
*/
10+
@JsonIgnoreProperties(ignoreUnknown = true)
11+
@JsonInclude(JsonInclude.Include.NON_NULL)
12+
public class EncryptionKey {
13+
14+
@JsonProperty("name")
15+
private String name;
16+
@JsonProperty("alg")
17+
private String alg;
18+
@JsonProperty("pem")
19+
private String pem;
20+
@JsonProperty("kid")
21+
private String kid;
22+
@JsonProperty("thumbprint_sha256")
23+
private String thumbprintSha256;
24+
25+
/**
26+
* @return the value of the {@code name} field.
27+
*/
28+
public String getName() {
29+
return name;
30+
}
31+
32+
/**
33+
* Sets the value of the {@code name} field.
34+
* @param name the value of the {@code name} field.
35+
*/
36+
public void setName(String name) {
37+
this.name = name;
38+
}
39+
40+
/**
41+
* @return the value of the {@code alg} field.
42+
*/
43+
public String getAlg() {
44+
return alg;
45+
}
46+
47+
/**
48+
* Sets the value of the {@code alg} field.
49+
* @param alg the value of the {@code alg} field.
50+
*/
51+
public void setAlg(String alg) {
52+
this.alg = alg;
53+
}
54+
55+
/**
56+
* @return the value of the {@code pem} field.
57+
*/
58+
public String getPem() {
59+
return pem;
60+
}
61+
62+
/**
63+
* Sets the value of the {@code pem} field.
64+
* @param pem the value of the {@code pem} field.
65+
*/
66+
public void setPem(String pem) {
67+
this.pem = pem;
68+
}
69+
70+
/**
71+
* @return the value of the {@code kid} field.
72+
*/
73+
public String getKid() {
74+
return kid;
75+
}
76+
77+
/**
78+
* Sets the value of the {@code kid} field.
79+
* @param kid the value of the {@code kid} field.
80+
*/
81+
public void setKid(String kid) {
82+
this.kid = kid;
83+
}
84+
85+
/**
86+
* @return the value of the {@code thumbprint_sha256} field.
87+
*/
88+
public String getThumbprintSha256() {
89+
return thumbprintSha256;
90+
}
91+
92+
/**
93+
* Sets the value of the {@code thumbprint_sha256} field.
94+
* @param thumbprintSha256 the value of the {@code thumbprint_sha256} field.
95+
*/
96+
public void setThumbprintSha256(String thumbprintSha256) {
97+
this.thumbprintSha256 = thumbprintSha256;
98+
}
99+
}

0 commit comments

Comments
 (0)