diff options
author | seshukm <seshu.kumar.m@huawei.com> | 2018-07-25 18:19:13 +0800 |
---|---|---|
committer | seshukm <seshu.kumar.m@huawei.com> | 2018-07-25 18:19:13 +0800 |
commit | 572d9b8259e2d66abdfb28be503fc62e7732c5b5 (patch) | |
tree | 3545c2e09fb0419ad4a8320eacb498c58d8dc3aa /keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java | |
parent | d5ab4c1ed47aa5f1170024cb1ac8cf3df15781d4 (diff) |
fix basic code issues of auth files
Issue-ID: SO-729
Change-Id: I36bb76578c39640c38b27ee5c8939341f908fba2
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java')
-rw-r--r-- | keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java | 546 |
1 files changed, 273 insertions, 273 deletions
diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java index 66d2854..2281d01 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java @@ -24,277 +24,277 @@ import org.codehaus.jackson.map.annotate.JsonRootName; @JsonRootName("auth") public class Authentication implements Serializable { - - public static final class Identity { - - public static final Identity password(String userId, String password) { - Identity identity = new Identity(); - identity.getMethods().add("password"); - Password method = new Password(); - method.getUser().setId(userId); - method.getUser().setPassword(password); - identity.setPassword(method); - return identity; - } - - public static final Identity password(String domainName, String username, String password) { - Identity identity = new Identity(); - identity.getMethods().add("password"); - Password method = new Password(); - com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password.User.Domain domain = new com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password.User.Domain(); - domain.setName(domainName); - method.getUser().setDomain(domain); - method.getUser().setName(username); - method.getUser().setPassword(password); - identity.setPassword(method); - return identity; - } - - public static final Identity token(String token) { - Identity identity = new Identity(); - identity.getMethods().add("token"); - Token method = new Token(); - method.setId(token); - identity.setToken(method); - return identity; - } - - private List<String> methods = new ArrayList<>(); - - public static final class Password { - - public static final class User { - - public static final class Domain { - - private String id; - - private String name; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - } - - private Domain domain; - - private String id; - - private String name; - - private String password; - - public Domain getDomain() { - return domain; - } - - public void setDomain(Domain domain) { - this.domain = domain; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - } - - private User user = new User(); - - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - } - - private Password password; - - public static final class Token { - - private String id; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - } - - private Token token; - - public List<String> getMethods() { - return methods; - } - - public void setMethods(List<String> methods) { - this.methods = methods; - } - - public Password getPassword() { - return password; - } - - public void setPassword(Password password) { - this.password = password; - } - - public Token getToken() { - return token; - } - - public void setToken(Token token) { - this.token = token; - } - - } - - private Identity identity; - - public static final class Scope { - - public static Scope project(String id) { - Scope scope = new Scope(); - Project project = new Project(); - project.setId(id); - scope.setProject(project); - return scope; - } - - public static Scope project(String domainName, String projectName) { - Scope scope = new Scope(); - com.woorea.openstack.keystone.v3.model.Authentication.Scope.Project.Domain domain = new com.woorea.openstack.keystone.v3.model.Authentication.Scope.Project.Domain(); - domain.setName(domainName); - Project project = new Project(); - project.setDomain(domain); - project.setName(projectName); - scope.setProject(project); - return scope; - } - - public static final class Project { - - public static final class Domain { - - private String id; - - private String name; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - } - - private String id; - - private Domain domain; - - private String name; - - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public Domain getDomain() { - return domain; - } - - public void setDomain(Domain domain) { - this.domain = domain; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - } - - private Project project; - - public Project getProject() { - return project; - } - - public void setProject(Project project) { - this.project = project; - } - - } - - private Scope scope; - - public Identity getIdentity() { - return identity; - } - - public void setIdentity(Identity identity) { - this.identity = identity; - } - - public Scope getScope() { - return scope; - } - - public void setScope(Scope scope) { - this.scope = scope; - } - + + public static final class Identity { + + public static final Identity password(String userId, String password) { + Identity identity = new Identity(); + identity.getMethods().add("password"); + Password method = new Password(); + method.getUser().setId(userId); + method.getUser().setPassword(password); + identity.setPassword(method); + return identity; + } + + public static final Identity password(String domainName, String username, String password) { + Identity identity = new Identity(); + identity.getMethods().add("password"); + Password method = new Password(); + com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password.User.Domain domain = new com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password.User.Domain(); + domain.setName(domainName); + method.getUser().setDomain(domain); + method.getUser().setName(username); + method.getUser().setPassword(password); + identity.setPassword(method); + return identity; + } + + public static final Identity token(String token) { + Identity identity = new Identity(); + identity.getMethods().add("token"); + Token method = new Token(); + method.setId(token); + identity.setToken(method); + return identity; + } + + private List<String> methods = new ArrayList<>(); + + public static final class Password { + + public static final class User { + + public static final class Domain { + + private String id; + + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } + + private Domain domain; + + private String id; + + private String name; + + private String password; + + public Domain getDomain() { + return domain; + } + + public void setDomain(Domain domain) { + this.domain = domain; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + } + + private User user = new User(); + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + } + + private Password password; + + public static final class Token { + + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + } + + private Token token; + + public List<String> getMethods() { + return methods; + } + + public void setMethods(List<String> methods) { + this.methods = methods; + } + + public Password getPassword() { + return password; + } + + public void setPassword(Password password) { + this.password = password; + } + + public Token getToken() { + return token; + } + + public void setToken(Token token) { + this.token = token; + } + + } + + private Identity identity; + + public static final class Scope { + + public static Scope project(String id) { + Scope scope = new Scope(); + Project project = new Project(); + project.setId(id); + scope.setProject(project); + return scope; + } + + public static Scope project(String domainName, String projectName) { + Scope scope = new Scope(); + com.woorea.openstack.keystone.v3.model.Authentication.Scope.Project.Domain domain = new com.woorea.openstack.keystone.v3.model.Authentication.Scope.Project.Domain(); + domain.setName(domainName); + Project project = new Project(); + project.setDomain(domain); + project.setName(projectName); + scope.setProject(project); + return scope; + } + + public static final class Project { + + public static final class Domain { + + private String id; + + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } + + private String id; + + private Domain domain; + + private String name; + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Domain getDomain() { + return domain; + } + + public void setDomain(Domain domain) { + this.domain = domain; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + } + + private Project project; + + public Project getProject() { + return project; + } + + public void setProject(Project project) { + this.project = project; + } + + } + + private Scope scope; + + public Identity getIdentity() { + return identity; + } + + public void setIdentity(Identity identity) { + this.identity = identity; + } + + public Scope getScope() { + return scope; + } + + public void setScope(Scope scope) { + this.scope = scope; + } + } |