org.yuequan.watchdog.endpoint.support.ApplicationParam Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of watchdog-spring-boot-starter Show documentation
Show all versions of watchdog-spring-boot-starter Show documentation
Watchdog is an OAuth 2 provider for SpringBoot
package org.yuequan.watchdog.endpoint.support;
import java.util.HashSet;
import java.util.Set;
/**
* @author yuequan
* @since
**/
public class ApplicationParam {
private String name;
private Set scope;
public final static String DEFAULT_REDIRECT_URL = "urn:ietf:wg:oauth:2.0:oob";
@org.codehaus.jackson.annotate.JsonProperty("redirect_uri")
@com.fasterxml.jackson.annotation.JsonProperty("redirect_uri")
private Set redirectUri;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Set getRedirectUri() {
return redirectUri;
}
public void setRedirectUri(Set redirectUri) {
this.redirectUri = redirectUri;
}
public Set getScope() {
return scope;
}
public void setScope(Set scope) {
this.scope = scope;
}
public void populateDefault(){
if(getScope() == null){
setScope(new HashSet<>());
}
if(getRedirectUri() == null){
setRedirectUri(new HashSet<>());
}
if(this.getRedirectUri().size() == 0){
getRedirectUri().add(DEFAULT_REDIRECT_URL);
}
if(getScope().size() == 0){
getScope().add("DEFAULT");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy