be.tomcools.rickrollsecurity.RickRollConfigurationProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rickroll-security-spring-boot-starter Show documentation
Show all versions of rickroll-security-spring-boot-starter Show documentation
Redirects common security endpoints to Rick Astley - Never Gonna Give You Up
package be.tomcools.rickrollsecurity;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.util.ArrayList;
import java.util.List;
@AutoConfiguration
@ConfigurationProperties(prefix = "rickroll")
public class RickRollConfigurationProperties {
private List paths;
private List fileExtensions;
private Version version = Version.ORIGINAL;
public List getFileExtensions() {
if(fileExtensions == null) {
return new ArrayList<>();
}
return fileExtensions;
}
public void setFileExtensions(List fileExtensions) {
this.fileExtensions = fileExtensions;
}
public List getPaths() {
if(paths == null) {
return new ArrayList<>();
}
return paths;
}
public void setPaths(List paths) {
this.paths = paths;
}
void setVersion(Version version) {
this.version = version;
}
public String getVersionUrl() {
return version.url;
}
enum Version {
ORIGINAL("https://www.youtube.com/watch?v=dQw4w9WgXcQ"),
METAL_CALEB("https://www.youtube.com/watch?v=MXMf_ni0Msk"),
SCARY_POCKETS("https://www.youtube.com/watch?v=sQnoZUR6fvY");
final String url;
private Version(String url) {
this.url = url;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy