Skip to content

Instantly share code, notes, and snippets.

@vdelacou
Created June 14, 2018 09:26
Show Gist options
  • Save vdelacou/a3ff399ba8c9cb618bdd80095a3b5e0f to your computer and use it in GitHub Desktop.
Save vdelacou/a3ff399ba8c9cb618bdd80095a3b5e0f to your computer and use it in GitHub Desktop.
Add Auth0 Properties with Management API to JHipster spring boot application
package com.seelix.api.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Properties specific to Seelix.
* <p>
* Properties are configured in the application.yml file. See
* {@link io.github.jhipster.config.JHipsterProperties} for a good example.
*/
@ConfigurationProperties(prefix = "application", ignoreUnknownFields = false)
public class ApplicationProperties {
private final Security security = new Security();
public Security getSecurity() {
return security;
}
public static class Security {
private final Authentication authentication = new Authentication();
public Authentication getAuthentication() {
return authentication;
}
public static class Authentication {
private final Auth0 auth0 = new Auth0();
public Auth0 getAuth0() {
return auth0;
}
public static class Auth0 {
private String audience;
private String issuer;
public String getAudience() {
return audience;
}
public void setAudience(String audience) {
this.audience = audience;
}
public String getIssuer() {
return issuer;
}
public void setIssuer(String issuer) {
this.issuer = issuer;
}
private final Management management = new Management();
public Management getManagement() {
return management;
}
public static class Management {
private String audience;
private String domain;
private String clientId;
private String clientSecret;
private String connection;
public String getAudience() {
return audience;
}
public void setAudience(String audience) {
this.audience = audience;
}
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
public String getConnection() {
return connection;
}
public void setConnection(String connection) {
this.connection = connection;
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment