Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.AuthMechanism


      authMechs = ((OutboundResourceAdapter)descriptor).getAuthMechanisms().iterator();
  }

  //auth mechanism info
  for (;authMechs.hasNext();) {
      AuthMechanism auth = (AuthMechanism) authMechs.next();
      Node authNode = appendChild(parent, ConnectorTagNames.AUTH_MECHANISM);
      appendTextChild(authNode, TagNames.DESCRIPTION, auth.getDescription());
      appendTextChild(authNode, ConnectorTagNames.AUTH_MECH_TYPE, auth.getAuthMechType());  
      appendTextChild(authNode, ConnectorTagNames.CREDENTIAL_INTF, auth.getCredentialInterface())
  }
  return parent;
    }
View Full Code Here


                 "No authentication mechanism defined for this resource adapater"));
            return result;
        }
        Iterator mechIterator = mechanisms.iterator();
        while (mechIterator.hasNext()) {
            AuthMechanism am = (AuthMechanism) mechIterator.next();
            String credInterface = am.getCredentialInterface();
            boolean allowedInterface = false;           
            if (credInterface!=null) {
                for (int i=0;i<allowedInterfaces.length;i++) {
                    if (credInterface.equals(allowedInterfaces[i])) {
                        allowedInterface = true;
View Full Code Here

                 "No authentication mechanism defined for this resource adapater"));           
            return result;
        }
        Iterator mechIterator = mechanisms.iterator();
        while (mechIterator.hasNext()) {
            AuthMechanism am = (AuthMechanism) mechIterator.next();
            String authMechType = am.getAuthMechType();
            boolean allowedMech = false;           
            if (authMechType!=null) {
                for (int i=0;i<allowedMechs.length;i++) {
                    if (authMechType.equals(allowedMechs[i])) {
                        allowedMech = true;
View Full Code Here

                 "No authentication mechanism defined for this resource adapater"));
            return result;
        }
        Iterator mechIterator = mechanisms.iterator();
        while (mechIterator.hasNext()) {
            AuthMechanism am = (AuthMechanism) mechIterator.next();
            String credInterface = am.getCredentialInterface();
            boolean allowedInterface = false;           
            if (credInterface!=null) {
                for (int i=0;i<allowedInterfaces.length;i++) {
                    if (credInterface.equals(allowedInterfaces[i])) {
                        allowedInterface = true;
View Full Code Here

                 "No authentication mechanism defined for this resource adapater"));           
            return result;
        }
        Iterator mechIterator = mechanisms.iterator();
        while (mechIterator.hasNext()) {
            AuthMechanism am = (AuthMechanism) mechIterator.next();
            String authMechType = am.getAuthMechType();
            boolean allowedMech = false;           
            if (authMechType!=null) {
                for (int i=0;i<allowedMechs.length;i++) {
                    if (authMechType.equals(allowedMechs[i])) {
                        allowedMech = true;
View Full Code Here

        ConnectorDescriptor cd = _registry.getDescriptor(rarName);
        OutboundResourceAdapter obra = cd.getOutboundResourceAdapter();
        Set authMechs = obra.getAuthMechanisms();
        for (Object authMech : authMechs) {
            AuthMechanism authMechanism = (AuthMechanism) authMech;
            String mech = authMechanism.getAuthMechType();
            if (mech.equals("BasicPassword")) {
                return new BasicPasswordAuthenticationService(rarName, poolInfo);
            }
        }
        return null;
View Full Code Here

                boolean ignore = false;
                OutboundResourceAdapter ora = getOutbound(desc);
                Set ddAuthMechanisms = ora.getAuthMechanisms();

                for (Object o : ddAuthMechanisms) {
                    AuthMechanism ddAuthMechanism = (AuthMechanism) o;
                    if (ddAuthMechanism.getAuthMechType().equals(auth.authMechanism())) {
                        ignore = true;
                        break;
                    }
                }

                // if it was not specified in DD, add it to connector-descriptor
                if (!ignore) {
                    String credentialInterfaceName = ora.getCredentialInterfaceName(auth.credentialInterface());
                    //XXX: Siva: For now use the first provided description
                    String description = "";
                    if(auth.description().length > 0){
                        description = auth.description()[0];
                    }
                    AuthMechanism authM = new AuthMechanism(description, authMechInt, credentialInterfaceName);
                    ora.addAuthMechanism(authM);
                }
            }
        }
View Full Code Here

                //XXX: Siva: For now use the first description
                String firstDesc = "";
                if(description.length > 0) {
                    firstDesc = description[0];
                }
                AuthMechanism auth = new AuthMechanism(firstDesc, authMechanismValue, credentialInterface);
                ora.addAuthMechanism(auth);
            } else {
                getFailureResult(element, "Not a @Connector annotation : @AuthenticationMechanism must " +
                        "be specified along with @Connector annotation", true);
            }
View Full Code Here

      authMechs = ((OutboundResourceAdapter)descriptor).getAuthMechanisms().iterator();
  }

  //auth mechanism info
  for (;authMechs.hasNext();) {
      AuthMechanism auth = (AuthMechanism) authMechs.next();
      Node authNode = appendChild(parent, ConnectorTagNames.AUTH_MECHANISM);
      appendTextChild(authNode, TagNames.DESCRIPTION, auth.getDescription());
      appendTextChild(authNode, ConnectorTagNames.AUTH_MECH_TYPE, auth.getAuthMechType());  
      appendTextChild(authNode, ConnectorTagNames.CREDENTIAL_INTF, auth.getCredentialInterface())
  }
  return parent;
    }
View Full Code Here

                //XXX: Siva: For now use the first description
                String firstDesc = "";
                if(description.length > 0) {
                    firstDesc = description[0];
                }
                AuthMechanism auth = new AuthMechanism(firstDesc, authMechanismValue, credentialInterface);
                ora.addAuthMechanism(auth);
            } else {
                getFailureResult(element, "Not a @Connector annotation : @AuthenticationMechanism must " +
                        "be specified along with @Connector annotation", true);
            }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.AuthMechanism

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.