Examples of AuthenticationStatus


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

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

*          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

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

      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

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

      // 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

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

   * @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

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

   * @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

Examples of com.sun.enterprise.security.auth.AuthenticationStatus

     * authenticateUser calls authenticate which is implemented by the implementation
     * of this subclass
     * @throws LoginException
     */
    protected final void authenticateUser() throws LoginException{
        AuthenticationStatus as = authenticate();
        if(as.getStatus() == as.AUTH_SUCCESS)
            return;
        else{
            throw new LoginException();
        }
    }
View Full Code Here

Examples of com.sun.enterprise.security.auth.AuthenticationStatus

    {
        commitUserAuthentication(groups);
        int status = AuthenticationStatus.AUTH_SUCCESS;
        String realm = theRealm.getName();
        String authMethod = theRealm.getAuthType();
        AuthenticationStatus as =
            new AuthenticationStatusImpl(username, authMethod, realm, status);
        return as;
    }
View Full Code Here

Examples of com.sun.enterprise.security.auth.AuthenticationStatus

     * authenticateUser calls authenticate which is implemented by the implementation
     * of this subclass
     * @throws LoginException
     */
    protected final void authenticateUser() throws LoginException{
        AuthenticationStatus as = authenticate();
        if(as.getStatus() == as.AUTH_SUCCESS)
            return;
        else{
            throw new LoginException();
        }
    }
View Full Code Here

Examples of com.sun.enterprise.security.auth.AuthenticationStatus

    {
        commitUserAuthentication(groups);
        int status = AuthenticationStatus.AUTH_SUCCESS;
        String realm = theRealm.getName();
        String authMethod = theRealm.getAuthType();
        AuthenticationStatus as =
            new AuthenticationStatusImpl(username, authMethod, realm, status);
        return as;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.