package com.auth0.json.mgmt.client; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; /** * Class that represents an Auth0 Client object. Related to the {@link com.auth0.client.mgmt.ClientsEntity} entity. */ @SuppressWarnings({"WeakerAccess", "unused"}) @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public class Client { @JsonProperty("name") private String name; @JsonProperty("client_id") private String clientId; @JsonProperty("client_secret") private String clientSecret; @JsonProperty("app_type") private String appType; @JsonProperty("logo_uri") private String logoUri; @JsonProperty("is_first_party") private Boolean isFirstParty; @JsonProperty("oidc_conformant") private Boolean oidcConformant; @JsonProperty("callbacks") private List<String> callbacks; @JsonProperty("allowed_origins") private List<String> allowedOrigins; @JsonProperty("client_aliases") private List<String> clientAliases; @JsonProperty("allowed_clients") private List<String> allowedClients; @JsonProperty("allowed_logout_urls") private List<String> allowedLogoutUrls; @JsonProperty("jwt_configuration") private JWTConfiguration jwtConfiguration; @JsonProperty("signing_keys") private List<SigningKey> signingKeys; @JsonProperty("encryption_key") private EncryptionKey encryptionKey; @JsonProperty("sso") private Boolean sso; @JsonProperty("sso_disabled") private Boolean ssoDisabled; @JsonProperty("custom_login_page_on") private Boolean customLoginPageOn; @JsonProperty("is_heroku_app") private Boolean isHerokuApp; @JsonProperty("custom_login_page") private String customLoginPage; @JsonProperty("custom_login_page_preview") private String customLoginPagePreview; @JsonProperty("form_template") private String formTemplate; @JsonProperty("addons") private Addons addons; @JsonProperty("token_endpoint_auth_method") private String tokenEndpointAuthMethod; @JsonProperty("client_metadata") private Map<String, Object> clientMetadata; @JsonProperty("mobile") private Mobile mobile; /** * Creates a new Client instance setting the name property. * * @param name of the client. */ @JsonCreator public Client(@JsonProperty("name") String name) { this.name = name; } /** * Getter for the name of the client. * * @return the name. */ @JsonProperty("name") public String getName() { return name; } /** * Setter for the client name. * * @param name the name to use. */ @JsonProperty("name") public void setName(String name) { this.name = name; } /** * Getter for the client id. * * @return the client id. */ @JsonProperty("client_id") public String getClientId() { return clientId; } /** * Getter for the client secret. * * @return the client secret. */ @JsonProperty("client_secret") public String getClientSecret() { return clientSecret; } /** * Setter for the Client Secret. If no secret is provided, it will be generated by the Auth0 Server upon Client creation. * * @param clientSecret the secret to use. */ @JsonProperty("client_secret") public void setClientSecret(String clientSecret) { this.clientSecret = clientSecret; } /** * Getter for the type of application this client represents. * * @return the application type. */ @JsonProperty("app_type") public String getAppType() { return appType; } /** * Setter for the type of application this client represents. * * @param appType the application type to set. */ @JsonProperty("app_type") public void setAppType(String appType) { this.appType = appType; } /** * Getter for the url of the client logo. * * @return the client logo url. */ @JsonProperty("logo_uri") public String getLogoUri() { return logoUri; } /** * Setter for the client logo url. An image with size 150x150 is recommended. * * @param logoUri the logo url to set. */ @JsonProperty("logo_uri") public void setLogoUri(String logoUri) { this.logoUri = logoUri; } /** * Whether this client is a first party client or not. * * @return true if the client is first party, false otherwise. */ @JsonProperty("is_first_party") public Boolean isFirstParty() { return isFirstParty; } /** * Whether this client will conform to strict Open ID Connect specifications or not. * * @return true if the client will conform to strict OIDC specifications, false otherwise. */ @JsonProperty("oidc_conformant") public Boolean isOIDCConformant() { return oidcConformant; } /** * Setter for the strict conform to the Open ID Connect specifications. * * @param oidcConformant whether the client will conform to strict OIDC specifications or not. */ @JsonProperty("oidc_conformant") public void setOIDCConformant(Boolean oidcConformant) { this.oidcConformant = oidcConformant; } /** * Getter for the list of allowed callback urls for the client. * * @return the list of callback urls. */ @JsonProperty("callbacks") public List<String> getCallbacks() { return callbacks; } /** * Setter for the list of allowed callback urls for the client. * * @param callbacks the allowed callback urls to set. */ @JsonProperty("callbacks") public void setCallbacks(List<String> callbacks) { this.callbacks = callbacks; } /** * Getter for the list of allowed origins for the client. * * @return the list of allowed origins. */ @JsonProperty("allowed_origins") public List<String> getAllowedOrigins() { return allowedOrigins; } /** * Setter for the list of allowed origins for the client. * * @param allowedOrigins the allowed callback urls to set. */ @JsonProperty("allowed_origins") public void setAllowedOrigins(List<String> allowedOrigins) { this.allowedOrigins = allowedOrigins; } /** * Getter for the list of client aliases. * * @return the list of client aliases. */ @JsonProperty("client_aliases") public List<String> getClientAliases() { return clientAliases; } /** * Setter for the list of client aliases. * * @param clientAliases the client aliases to set. */ @JsonProperty("client_aliases") public void setClientAliases(List<String> clientAliases) { this.clientAliases = clientAliases; } /** * Getter for the list of Apps/APIs that will be allowed to make a delegation request. * * @return the list of allowed clients. */ @JsonProperty("allowed_clients") public List<String> getAllowedClients() { return allowedClients; } /** * Setter for the list of Apps/APIs that will be allowed to make a delegation request. * * @param allowedClients the list of allowed clients. */ @JsonProperty("allowed_clients") public void setAllowedClients(List<String> allowedClients) { this.allowedClients = allowedClients; } /** * Getter for the client list of URLs that are valid to redirect to after logout from Auth0. * * @return the list of logout urls. */ @JsonProperty("allowed_logout_urls") public List<String> getAllowedLogoutUrls() { return allowedLogoutUrls; } /** * Setter for the client list of URLs that are valid to redirect to after logout from Auth0. * * @param allowedLogoutUrls the allowed logout urls to set. */ @JsonProperty("allowed_logout_urls") public void setAllowedLogoutUrls(List<String> allowedLogoutUrls) { this.allowedLogoutUrls = allowedLogoutUrls; } /** * Getter for the JWT configuration object. * * @return the JWT Configuration. */ @JsonProperty("jwt_configuration") public JWTConfiguration getJWTConfiguration() { return jwtConfiguration; } /** * Setter for the JWT configuration object. * * @param jwtConfiguration the JWT configuration to set. */ @JsonProperty("jwt_configuration") public void setJWTConfiguration(JWTConfiguration jwtConfiguration) { this.jwtConfiguration = jwtConfiguration; } /** * Getter for the client signing keys. * * @return the client signing keys. */ @JsonProperty("signing_keys") public List<SigningKey> getSigningKeys() { return signingKeys; } /** * Getter for the encryption Key. * * @return the encryption key. */ @JsonProperty("encryption_key") public EncryptionKey getEncryptionKey() { return encryptionKey; } /** * Setter for the encryption Key. * * @param encryptionKey the encryption key. */ @JsonProperty("encryption_key") public void setEncryptionKey(EncryptionKey encryptionKey) { this.encryptionKey = encryptionKey; } /** * Whether to use Auth0 instead of the Identity Provider to do Single Sign On or not. * * @return true if this client will use Auth0 for SSO instead of the Identity Provider or not. */ @JsonProperty("sso") public Boolean useAuth0SSO() { return sso; } /** * Sets if Auth0 will do Single Sign On instead of the Identity Provider. * * @param useAuth0SSO whether to use Auth0 instead of the Identity Provider to do Single Sign On or not. */ @JsonProperty("sso") public void setUseAuth0SSO(Boolean useAuth0SSO) { this.sso = useAuth0SSO; } /** * Whether Single Sign On is disabled or not for this client. * * @return true is SSO is disabled for this client, false otherwise. */ @JsonProperty("sso_disabled") public Boolean isSSODisabled() { return ssoDisabled; } /** * Sets if Single Sign On is disabled for this client or not. * * @param ssoDisabled whether SSO is disabled for this client or not. */ @JsonProperty("sso_disabled") public void setSSODisabled(Boolean ssoDisabled) { this.ssoDisabled = ssoDisabled; } /** * Whether to use a custom login page or the default one. * * @return true if this client uses a custom login page, false otherwise. */ @JsonProperty("custom_login_page_on") public Boolean useCustomLoginPage() { return customLoginPageOn; } /** * Sets if this client should use a custom login page or the default one. * * @param useCustomLoginPage true if this client uses a custom login page, false otherwise. */ @JsonProperty("custom_login_page_on") public void setUseCustomLoginPage(Boolean useCustomLoginPage) { this.customLoginPageOn = useCustomLoginPage; } /** * Whether this client is a Heroku application or not. * * @return true if this client is a Heroku application, false otherwise. */ @JsonProperty("is_heroku_app") public Boolean isHerokuApp() { return isHerokuApp; } /** * Getter for the custom login page HTML code. * * @return the custom login page HTML code. */ @JsonProperty("custom_login_page") public String getCustomLoginPage() { return customLoginPage; } /** * Setter for the custom login page HTML code. * * @param customLoginPage the custom login page HTML code. */ @JsonProperty("custom_login_page") public void setCustomLoginPage(String customLoginPage) { this.customLoginPage = customLoginPage; } /** * Getter for the custom login page preview HTML code. * * @return the custom login page preview HTML code. */ @JsonProperty("custom_login_page_preview") public String getCustomLoginPagePreview() { return customLoginPagePreview; } /** * Setter for the custom login page preview HTML code. * * @param customLoginPagePreview the custom login page preview HTML code. */ @JsonProperty("custom_login_page_preview") public void setCustomLoginPagePreview(String customLoginPagePreview) { this.customLoginPagePreview = customLoginPagePreview; } /** * Getter for the WS federation form template. * * @return the form template */ @JsonProperty("form_template") public String getFormTemplate() { return formTemplate; } /** * Setter for the WS federation form template. * * @param formTemplate the form template to set. */ @JsonProperty("form_template") public void setFormTemplate(String formTemplate) { this.formTemplate = formTemplate; } /** * Getter for the addons or plugins associated with an application in Auth0. * * @return the addons for this client. */ @JsonProperty("addons") public Addons getAddons() { return addons; } /** * Setter for the addons or plugins associated with an application in Auth0. * * @param addons the addons to set for this client. */ @JsonProperty("addons") public void setAddons(Addons addons) { this.addons = addons; } /** * Getter for the requested authentication method for the token endpoint. * * @return the requested authentication method. */ @JsonProperty("token_endpoint_auth_method") public String getTokenEndpointAuthMethod() { return tokenEndpointAuthMethod; } /** * Setter for the requested authentication method for the token endpoint. Possible values are 'none' (public client without a client secret), 'client_secret_post' (client uses HTTP POST parameters) or 'client_secret_basic' (client uses HTTP Basic). * * @param authMethod the authentication method to set. */ @JsonProperty("token_endpoint_auth_method") public void setTokenEndpointAuthMethod(String authMethod) { this.tokenEndpointAuthMethod = authMethod; } /** * Getter for the metadata associated with the client. * * @return the client metadata. */ @JsonProperty("client_metadata") public Map<String, Object> getClientMetadata() { return clientMetadata; } /** * Setter for the metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. * * @param clientMetadata the client metadata to set. */ @JsonProperty("client_metadata") public void setClientMetadata(Map<String, Object> clientMetadata) { this.clientMetadata = clientMetadata; } /** * Getter for the configuration related to native mobile apps. * * @return the mobile configuration. */ @JsonProperty("mobile") public Mobile getMobile() { return mobile; } /** * Setter for the configuration related to native mobile apps. * * @param mobile the mobile configuration to set. */ @JsonProperty("mobile") public void setMobile(Mobile mobile) { this.mobile = mobile; } }