Skip to content

Commit

Permalink
[SDK-4763] - Add support for HRI Management API changes (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames authored Apr 24, 2024
1 parent c050bf2 commit 90fb5a0
Show file tree
Hide file tree
Showing 19 changed files with 724 additions and 12 deletions.
35 changes: 35 additions & 0 deletions src/main/java/com/auth0/json/mgmt/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ public class Client {
private Boolean requiresPushedAuthorizationRequests;
@JsonProperty("oidc_backchannel_logout")
private OIDCBackchannelLogout oidcBackchannelLogout;
@JsonProperty("signed_request_object")
private SignedRequest signedRequest;
@JsonProperty("compliance_level")
private String complianceLevel;

/**
* Getter for the name of the tenant this client belongs to.
Expand Down Expand Up @@ -837,5 +841,36 @@ public OIDCBackchannelLogout getOidcBackchannelLogout() {
public void setOidcBackchannelLogout(OIDCBackchannelLogout oidcBackchannelLogout) {
this.oidcBackchannelLogout = oidcBackchannelLogout;
}

/**
* @return the value of the {@code signed_request_object} field.
*/
public SignedRequest getSignedRequest() {
return signedRequest;
}

/**
* Sets the value of the {@code SignedRequest} field.
*
* @param signedRequest the value to set the {@code signed_request_field} field to.
*/
public void setSignedRequest(SignedRequest signedRequest) {
this.signedRequest = signedRequest;
}

/**
* @return the value of the {@code compliance_level} field
*/
public String getComplianceLevel() {
return complianceLevel;
}

/**
* Sets the value of the {@code compliance_level} field
* @param complianceLevel the value of the {@code compliance_level} field
*/
public void setComplianceLevel(String complianceLevel) {
this.complianceLevel = complianceLevel;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,59 @@ public class ClientAuthenticationMethods {

@JsonProperty("private_key_jwt")
private PrivateKeyJwt privateKeyJwt;
@JsonProperty("self_signed_tls_client_auth")
private SelfSignedTLSClientAuth selfSignedTLSClientAuth;
@JsonProperty("tls_client_auth")
private TLSClientAuth tlsClientAuth;

public ClientAuthenticationMethods() {

}

/**
* Create a new instance.
* @param privateKeyJwt the value of the {@code private_key_jwt} field.
*/
public ClientAuthenticationMethods(PrivateKeyJwt privateKeyJwt) {
this(privateKeyJwt, null, null);
}

/**
* Create a new instance.
* @param privateKeyJwt the value of the {@code private_key_jwt} field.
* @param selfSignedTLSClientAuth the value of the {@code self_signed_tls_client_auth} field.
*/
public ClientAuthenticationMethods(PrivateKeyJwt privateKeyJwt, SelfSignedTLSClientAuth selfSignedTLSClientAuth) {
this(privateKeyJwt, selfSignedTLSClientAuth, null);
}

/**
* Create a new instance.
* @param privateKeyJwt the value of the {@code private_key_jwt} field.
* @param selfSignedTLSClientAuth the value of the {@code self_signed_tls_client_auth} field.
* @param tlsClientAuth the value of the {@code tls_client_auth} field.
*/
public ClientAuthenticationMethods(PrivateKeyJwt privateKeyJwt, SelfSignedTLSClientAuth selfSignedTLSClientAuth, TLSClientAuth tlsClientAuth) {
this.privateKeyJwt = privateKeyJwt;
this.selfSignedTLSClientAuth = selfSignedTLSClientAuth;
this.tlsClientAuth = tlsClientAuth;
}

public PrivateKeyJwt getPrivateKeyJwt() {
return privateKeyJwt;
}

/**
* @return the value of the {@code self_signed_tls_client_auth} field
*/
public SelfSignedTLSClientAuth getSelfSignedTLSClientAuth() {
return selfSignedTLSClientAuth;
}

/**
* @return the value of the {@code tls_client_auth} field
*/
public TLSClientAuth getTlsClientAuth() {
return tlsClientAuth;
}
}
17 changes: 17 additions & 0 deletions src/main/java/com/auth0/json/mgmt/client/Credential.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class Credential {
private String alg;
@JsonProperty("parse_expiry_from_cert")
private Boolean parseExpiryFromCert;
@JsonProperty("subject_dn")
private String subjectDn;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@JsonProperty("created_at")
private Date createdAt;
Expand Down Expand Up @@ -188,4 +190,19 @@ public Boolean getParseExpiryFromCert() {
public void setParseExpiryFromCert(Boolean parseExpiryFromCert) {
this.parseExpiryFromCert = parseExpiryFromCert;
}

/**
* @return the value of the {@code subject_dn} field
*/
public String getSubjectDn() {
return subjectDn;
}

/**
* Sets the value of the {@code subject_dn} field
* @param subjectDn the value of the {@code subject_dn} field
*/
public void setSubjectDn(String subjectDn) {
this.subjectDn = subjectDn;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.auth0.json.mgmt.client;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
* Class that represents an Auth0 Application self-signed TLS client authentication method. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity.
*/

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SelfSignedTLSClientAuth {

@JsonProperty("credentials")
private List<Credential> credentials;

/**
* Create a new instance
* @param credentials the credentials to use
*/
public SelfSignedTLSClientAuth(@JsonProperty("credentials") List<Credential> credentials) {
this.credentials = credentials;
}

/**
* @return the credentials
*/
public List<Credential> getCredentials() {
return credentials;
}
}
44 changes: 44 additions & 0 deletions src/main/java/com/auth0/json/mgmt/client/SignedRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.auth0.json.mgmt.client;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
* Class that represents an Auth0 Application signed request object. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SignedRequest {

@JsonProperty("required")
private Boolean required;
@JsonProperty("credentials")
private List<Credential> credentials;

/**
* @return the value of the {@code credentials} field
*/
public List<Credential> getCredentials() {
return credentials;
}

/**
* Sets the value of the {@code credentials} field
*
* @param credentials the value of the {@code credentials} field
*/
public void setCredentials(List<Credential> credentials) {
this.credentials = credentials;
}

public Boolean getRequired() {
return required;
}

public void setRequired(Boolean required) {
this.required = required;
}
}
32 changes: 32 additions & 0 deletions src/main/java/com/auth0/json/mgmt/client/TLSClientAuth.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.auth0.json.mgmt.client;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
* Class that represents an Auth0 Application TLS client authentication method. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TLSClientAuth {
@JsonProperty("credentials")
private List<Credential> credentials;

/**
* Create a new instance
* @param credentials the credentials to use
*/
public TLSClientAuth(@JsonProperty("credentials") List<Credential> credentials) {
this.credentials = credentials;
}

/**
* @return the credentials
*/
public List<Credential> getCredentials() {
return credentials;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.auth0.json.mgmt.resourceserver;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Class that represents the authorization details associated with a {@link ResourceServer}
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AuthorizationDetails {

@JsonProperty("type")
private String type;

/**
* Create a new instance.
* @param type the value of the {@code type} field.
*/
@JsonCreator
public AuthorizationDetails(@JsonProperty("type") String type) {
this.type = type;
}

/**
* @return the value of the {@code type} field
*/
public String getType() {
return type;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
package com.auth0.json.mgmt.resourceserver;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Class that represents the encryption key associated with a {@link TokenEncryption}
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class EncryptionKey {

@JsonProperty("name")
private String name;
@JsonProperty("alg")
private String alg;
@JsonProperty("pem")
private String pem;
@JsonProperty("kid")
private String kid;
@JsonProperty("thumbprint_sha256")
private String thumbprintSha256;

/**
* @return the value of the {@code name} field.
*/
public String getName() {
return name;
}

/**
* Sets the value of the {@code name} field.
* @param name the value of the {@code name} field.
*/
public void setName(String name) {
this.name = name;
}

/**
* @return the value of the {@code alg} field.
*/
public String getAlg() {
return alg;
}

/**
* Sets the value of the {@code alg} field.
* @param alg the value of the {@code alg} field.
*/
public void setAlg(String alg) {
this.alg = alg;
}

/**
* @return the value of the {@code pem} field.
*/
public String getPem() {
return pem;
}

/**
* Sets the value of the {@code pem} field.
* @param pem the value of the {@code pem} field.
*/
public void setPem(String pem) {
this.pem = pem;
}

/**
* @return the value of the {@code kid} field.
*/
public String getKid() {
return kid;
}

/**
* Sets the value of the {@code kid} field.
* @param kid the value of the {@code kid} field.
*/
public void setKid(String kid) {
this.kid = kid;
}

/**
* @return the value of the {@code thumbprint_sha256} field.
*/
public String getThumbprintSha256() {
return thumbprintSha256;
}

/**
* Sets the value of the {@code thumbprint_sha256} field.
* @param thumbprintSha256 the value of the {@code thumbprint_sha256} field.
*/
public void setThumbprintSha256(String thumbprintSha256) {
this.thumbprintSha256 = thumbprintSha256;
}
}
Loading

0 comments on commit 90fb5a0

Please sign in to comment.