Examples of OID


Examples of org.datanucleus.identity.OID

            sm.provideFields(new int[] {mmd.getAbsoluteFieldNumber()}, fm);
            return fm.fetchObjectField(mmd.getAbsoluteFieldNumber());
        }
        else if (cmd.getIdentityType() == IdentityType.DATASTORE)
        {
            OID oid = (OID)nucleusCtx.getApiAdapter().getIdForObject(value);
            return oid != null ? oid.getKeyValue() : null;
        }
        return null;
    }
View Full Code Here

Examples of org.dmlite.model.id.Oid

  protected void load(Element element) throws DmException {
    try {
      Attribute oidAttribute = element.attribute("oid");
      if (oidAttribute != null) {
        String oidString = oidAttribute.getText().trim();
        Oid oid = new Oid(Transformer.longInteger(oidString));
        entity.setOid(oid);
      }

      Element codeChild = element.element("code");
      if (codeChild != null) {
View Full Code Here

Examples of org.exolab.castor.persist.OID

            }
            while (removedItor.hasNext()) {
                // must be loaded thur transaction, so that the related object
                // is properly locked and updated before we delete it.
                Identity identity = (Identity) removedItor.next();
                if (!tx.isDeletedByOID(new OID(fieldClassMolder, identity))) {
                    ProposedEntity proposedValue = new ProposedEntity(fieldClassMolder);
                    Object reldel = tx.load(identity, proposedValue, null);
                    if (reldel != null && tx.isPersistent(reldel)) {
                        tx.writeLock(reldel, tx.getLockTimeout());
View Full Code Here

Examples of org.ietf.jgss.Oid

  private GSSContext context=null;
  public void create(String user, String host) throws JSchException{
    try{
      // RFC 1964
      Oid krb5=new Oid("1.2.840.113554.1.2.2");
      // Kerberos Principal Name Form
      Oid principalName=new Oid("1.2.840.113554.1.2.2.1");

      GSSManager mgr=GSSManager.getInstance();

      GSSCredential crd=null;
      /*
 
View Full Code Here

Examples of org.ietf.jgss.Oid

        }
        byte[] bo = new byte[len];
        System.arraycopy(buf, i, bo, 0, len);
        i += len;
        try{
            oid = new Oid(bo);
        }catch (GSSException e) {
            throw new IllegalArgumentException(e.getMessage());
        }
       
        // NAME_LEN
View Full Code Here

Examples of org.ietf.jgss.Oid

            String name,
            int userLifetime,
            int contextLifetime
            ) throws GSSException{
        GSSManager manager = GSSManager.getInstance();
        Oid oid = null;
        GSSName serviceName = null;
        GSSName clientName = null;
        GSSCredential clientCreds = null;
       
        oid = new Oid(OID);

        serviceName = manager.createName(
                service + "@" + host, GSSName.NT_HOSTBASED_SERVICE, oid);
        if(name!=null){
            clientName = manager.createName(name, GSSName.NT_USER_NAME, oid);
View Full Code Here

Examples of org.ietf.jgss.Oid

                new PrivilegedExceptionAction<GSSCredential>() {
                    @Override
                    public GSSCredential run() throws GSSException {
                        return manager.createCredential(null,
                                GSSCredential.DEFAULT_LIFETIME,
                                new Oid("1.3.6.1.5.5.2"),
                                GSSCredential.ACCEPT_ONLY);
                    }
                };
            gssContext = manager.createContext(Subject.doAs(lc.getSubject(), action));
View Full Code Here

Examples of org.ietf.jgss.Oid

            // Get mechanism count from buffer and look for Kerberos 5.

            int num = buffer.getInt();

            for (int i = 0; i < num; i++) {
                Oid oid = new Oid(buffer.getBytes());

                if (oid.equals(KRB5_MECH)) {
                    log.debug("UserAuthGSS: found Kerberos 5");

                    // Validate initial user before proceeding

                    if (!auth.validateInitialUser(session, username)) {
                        return Boolean.FALSE;
                    }

                    GSSManager mgr = auth.getGSSManager();
                    GSSCredential creds = auth.getGSSCredential(mgr);

                    if (creds == null) {
                        return Boolean.FALSE;
                    }

                    context = mgr.createContext(creds);

                    // Send the matching mechanism back to the client

                    Buffer b = session.createBuffer(SshConstants.Message.SSH_MSG_USERAUTH_INFO_REQUEST, 0);
                    byte[] out = oid.getDER();

                    b.putBytes(out);
                    session.writePacket(b);

                    return null;
View Full Code Here

Examples of org.ietf.jgss.Oid

     * @param rep The string form
     * @return The Oid
     */
    private static Oid createOID(String rep) {
        try {
            return new Oid(rep);
        } catch (GSSException e) {
            // won't happen
            return null;
        }
    }
View Full Code Here

Examples of org.ietf.jgss.Oid

             *
             * Unfortunately SPNEGO is JRE >=1.6.
             */

            /** Try SPNEGO by default, fall back to Kerberos later if error */
            negotiationOid  = new Oid(SPNEGO_OID);

            boolean tryKerberos = false;
            try {
                GSSManager manager = getManager();
                GSSName serverName = manager.createName("HTTP@" + authServer, GSSName.NT_HOSTBASED_SERVICE);
                gssContext = manager.createContext(
                        serverName.canonicalize(negotiationOid), negotiationOid, null,
                        GSSContext.DEFAULT_LIFETIME);
                gssContext.requestMutualAuth(true);
                gssContext.requestCredDeleg(true);
            } catch (GSSException ex){
                // BAD MECH means we are likely to be using 1.5, fall back to Kerberos MECH.
                // Rethrow any other exception.
                if (ex.getMajor() == GSSException.BAD_MECH ){
                    log.debug("GSSException BAD_MECH, retry with Kerberos MECH");
                    tryKerberos = true;
                } else {
                    throw ex;
                }

            }
            if (tryKerberos){
                /* Kerberos v5 GSS-API mechanism defined in RFC 1964.*/
                log.debug("Using Kerberos MECH " + KERBEROS_OID);
                negotiationOid  = new Oid(KERBEROS_OID);
                GSSManager manager = getManager();
                GSSName serverName = manager.createName("HTTP@" + authServer, GSSName.NT_HOSTBASED_SERVICE);
                gssContext = manager.createContext(
                        serverName.canonicalize(negotiationOid), negotiationOid, null,
                        GSSContext.DEFAULT_LIFETIME);
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.