Skip to content

Instantly share code, notes, and snippets.

@wkorando
Created December 30, 2019 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wkorando/2f1fa8284a7b2c4af2a0d26d825ce1dd to your computer and use it in GitHub Desktop.
Save wkorando/2f1fa8284a7b2c4af2a0d26d825ce1dd to your computer and use it in GitHub Desktop.
@ConfigurationProperties(prefix = "my-org.web.security")
public class WebSecurityConfigurer {
/**
* Endpoints that require the USER role to access
*/
private String[] userEndpoints = new String[] {};
/**
* Endpoints that require the ADMIN role to access
*/
private String[] adminEndpoints = new String[] {};
/**
* Endpoints that have no security requirements.
*
* Default value: /public**
*/
private String[] unsecuredEndpoints = new String[] {"/public**"};
public String[] getUserEndpoints() {
return userEndpoints;
}
public void setUserEndpoints(String[] userEndpoints) {
this.userEndpoints = userEndpoints;
}
public String[] getAdminEndpoints() {
return adminEndpoints;
}
public void setAdminEndpoints(String[] adminEndpoints) {
this.adminEndpoints = adminEndpoints;
}
public String[] getUnsecuredEndpoints() {
return unsecuredEndpoints;
}
public void setUnsecuredEndpoints(String[] unsecuredEndpoints) {
this.unsecuredEndpoints = unsecuredEndpoints;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment