Package com.esri.gpt.framework.security.identity

Examples of com.esri.gpt.framework.security.identity.AuthenticationStatus


* @param role the role(s) to check (must be a String)
* @return Boolean.TRUE if the active user has the specified role
*/
@Override
public Boolean get(Object role) {
  AuthenticationStatus authStatus = _activeUser.getAuthenticationStatus();
  RoleSet authRoles = _activeUser.getAuthenticationStatus().getAuthenticatedRoles();
  if ((role != null) && (role instanceof String)) {
    String sRole = Val.chkStr((String)role);
    boolean bAnonymous = !authStatus.getWasAuthenticated();
    if (sRole.equalsIgnoreCase("anonymous")) {
      return new Boolean(bAnonymous);
    } else if (!bAnonymous) {
      if (sRole.equalsIgnoreCase("openid")) {
        return Val.chkStr(_activeUser.getKey()).startsWith("urn:openid:");
View Full Code Here


*          the request context
* @return the GETCLIENTSERVICES axl
*/
private String getClientServices(RequestContext context) {
  ImsCatalog catalog = context.getCatalogConfiguration().getArcImsCatalog();
  AuthenticationStatus authStatus = context.getUser().getAuthenticationStatus();
  boolean bIsAdministrator = authStatus.getAuthenticatedRoles().hasRole(
      "gptAdministrator");
  boolean bIsPublisher = authStatus.getAuthenticatedRoles().hasRole(
      "gptPublisher");

  StringBuffer sb = new StringBuffer();
  sb.append("<ARCXML version=\"1.0\">\n");
  sb.append("<RESPONSE><SERVICES>");
View Full Code Here

      return;
    }
       
    // ensure acl access
    RequestContext rContext = context.getRequestContext();
    AuthenticationStatus auth = rContext.getUser().getAuthenticationStatus();
    boolean bAdmin = auth.getAuthenticatedRoles().hasRole("gptAdministrator");
    if (!bAdmin) {     
      MetadataAcl acl = new MetadataAcl(rContext);
      if (!acl.isPolicyUnrestricted()) {
        LuceneIndexAdapter adapter = new LuceneIndexAdapter(rContext);
        String[] resourceAcls = adapter.queryAcls(resourceId);
View Full Code Here

      // filters
      Filter filter = null;
     
      // make the access control filter
      MetadataAcl acl = new MetadataAcl(reqContext);
      AuthenticationStatus auth = reqContext.getUser().getAuthenticationStatus();
      boolean bAdmin = auth.getAuthenticatedRoles().hasRole("gptAdministrator");
      if (!bAdmin && !acl.isPolicyUnrestricted()) {
        String[] aclValues = acl.makeUserAcl();
        filter = new AclFilter(Storeables.FIELD_ACL,aclValues);
      }
     
View Full Code Here

   * @param reader the Lucene index reader
   * @throws IOException if an index i/o exception occurs
   */
  public void prepare(IndexReader reader) throws IOException {   
    MetadataAcl acl = new MetadataAcl(this.requestContext);
    AuthenticationStatus auth = this.requestContext.getUser().getAuthenticationStatus();
    boolean bAdmin = auth.getAuthenticatedRoles().hasRole("gptAdministrator");
    Filter filter = null;
    if (!bAdmin && !acl.isPolicyUnrestricted()) {
      String[] aclValues = acl.makeUserAcl();
      filter = new AclFilter(Storeables.FIELD_ACL,aclValues);
    }
View Full Code Here

   * @throws ParserConfigurationException
   * @throws SQLException
   */
  public boolean hasReadAccess(User user, String uuid) throws SQLException,
      ParserConfigurationException, SAXException, IOException {
    AuthenticationStatus auth = user.getAuthenticationStatus();
    boolean bAdmin = auth.getAuthenticatedRoles().hasRole("gptAdministrator");
    if (bAdmin || isPolicyUnrestricted()) {
      return true;
    } else {
      if (uuid == null) {
        return true;
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.security.identity.AuthenticationStatus

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.