Package io.fathom.cloud.identity.api.os.model.v2

Examples of io.fathom.cloud.identity.api.os.model.v2.Tenant


            throw new WebApplicationException(Status.UNAUTHORIZED);
        }

        V2AuthResponse response = new V2AuthResponse();

        Access access = response.access = new Access();
        V2Token token = access.token = new V2Token();

        ProjectData project = authentication.getProject();

        // We never pass domain; we can't build a domain token with V2
View Full Code Here


    @Inject
    IdentityService identityService;

    @GET
    public GetTenantsResponse doTenantsGet() throws CloudException {
        GetTenantsResponse response = new GetTenantsResponse();
        List<TenantDetails> tenants = response.tenants = Lists.newArrayList();

        UserData user = getUser();
        AuthenticatedUser authenticated = getAuthenticatedUser();
View Full Code Here

        return response;
    }

    private Role toModel(RoleData model) {
        Role role = new Role();
        role.id = "" + model.getId();
        role.name = model.getName();
        // if (model.hasDescription()) {
        // role.description = model.getDescription();
        // }
View Full Code Here

        return response;
    }

    private Role toModel(RoleData data) {
        Role role = new Role();
        role.id = "" + data.getId();
        role.name = data.getName();
        return role;
    }
View Full Code Here

                RoleData role = identityService.findRole(roleId);
                if (role == null) {
                    throw new IllegalStateException();
                }

                Role model = toModel(project, role);
                user.roles.add(model);
            }
        }

        log.info("Returning auth: {}", response);
View Full Code Here

        return Lists.newArrayList(v2Endpoints.values());
    }

    private Role toModel(ProjectData project, RoleData role) {
        Role model = new Role();
        model.id = "" + role.getId();
        model.name = role.getName();
        if (project != null) {
            model.tenantId = "" + project.getId();
        }
View Full Code Here

        TokenInfo tokenInfo = loginService.buildTokenInfo(authentication);

        token.expires = TokenAuth.getExpiration(tokenInfo);
        token.id = tokenService.encodeToken(tokenInfo);
        if (project != null) {
            Tenant tenant = new Tenant();
            tenant.id = "" + project.getId();
            tenant.name = project.getName();
            token.tenant = tenant;
        }
View Full Code Here

            if (project == null) {
                log.warn("Cannot find project {}", projectId);
                continue;
            }

            TenantDetails tenant = toTenantDetails(project);
            tenants.add(tenant);
        }

        return response;
    }
View Full Code Here

        return response;
    }

    private TenantDetails toTenantDetails(ProjectData project) {
        TenantDetails tenant = new TenantDetails();

        tenant.id = "" + project.getId();
        tenant.name = project.getName();
        tenant.description = project.getDescription();
View Full Code Here

public class V2TokensResource extends IdentityResourceBase {
    private static final Logger log = LoggerFactory.getLogger(V2TokensResource.class);

    @POST
    public V2AuthResponse doTokensPost(V2AuthRequest request) throws CloudException {
        V2AuthCredentials authRequest = request.authInfo;
        if (authRequest == null) {
            authRequest = new V2AuthCredentials();
        }

        boolean hasPasswordCredentials = false;
        if (authRequest.passwordCredentials != null && !Strings.isNullOrEmpty(authRequest.passwordCredentials.username)) {
            hasPasswordCredentials = true;
View Full Code Here

TOP

Related Classes of io.fathom.cloud.identity.api.os.model.v2.Tenant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.