Package org.platformlayer.auth

Examples of org.platformlayer.auth.UserProjectEntity


      //
      // if (!projectEntity.isSecretValid()) {
      // throw404NotFound();
      // }

      UserProjectEntity userProject = null;
      try {
        userProject = userAuthenticator.findUserProject(userEntity, projectEntity);
      } catch (AuthenticatorException e) {
        log.warn("Error while fetching project", e);
        throwInternalError();
      }

      if (userProject == null) {
        // Not a member of project
        throw404NotFound();
      }

      response.access.project = Mapping.mapToProject(projectEntity);
      response.access.project.roles = Mapping.mapToRoles(userProject.getRoles());
    }

    return response;
  }
View Full Code Here


      if (!projectEntity.isSecretValid()) {
        throw404NotFound();
      }

      UserProjectEntity userProject = null;
      try {
        userProject = userAuthenticator.findUserProject(userEntity, projectEntity);
      } catch (AuthenticatorException e) {
        log.warn("Error while fetching project", e);
        throwInternalError();
      }

      if (userProject == null) {
        // Not a member of project
        throw404NotFound();
      }

      response.access.project = Mapping.mapToProject(projectEntity);
      response.access.project.roles = Mapping.mapToRoles(userProject.getRoles());
    }

    return response;
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.auth.UserProjectEntity

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.