All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opendaylight.aaa.shiro.keystone.domain.KeystoneToken Maven / Gradle / Ivy

There is a newer version: 0.20.3
Show newest version
/*
 * Copyright (c) 2017 Ericsson Inc.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

package org.opendaylight.aaa.shiro.keystone.domain;

import java.util.ArrayList;
import java.util.List;

/**
 * This class represents a Keystone API v3 Token object.
 */
public class KeystoneToken {
    private Token token;

    public KeystoneToken() {

    }

    public KeystoneToken(Token theToken) {
        token = theToken;
    }

    public void setToken(Token theToken) {
        token = theToken;
    }

    public Token getToken() {
        return token;
    }

    public static final class Token {
        private List roles = new ArrayList<>();

        public Token() {

        }

        public Token(List theRoles) {
            roles.addAll(theRoles);
        }

        public void addRoles(List theRoles) {
            roles.addAll(theRoles);
        }

        public List getRoles() {
            return roles;
        }

        public static final class Role {
            private String name;

            private String id;

            public Role() {

            }

            public Role(String theRoleName, String theId) {
                name = theRoleName;
                id = theId;
            }

            public void setName(String theRoleName) {
                name = theRoleName;
            }

            public String getName() {
                return name;
            }

            public void setId(String theId) {
                id = theId;
            }

            public String getId() {
                return id;
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy