Codota Logo
GSSName.equals
Code IndexAdd Codota to your IDE (free)

How to use
equals
method
in
org.ietf.jgss.GSSName

Best Java code snippets using org.ietf.jgss.GSSName.equals (Showing top 11 results out of 315)

  • Common ways to obtain GSSName
private void myMethod () {
GSSName g =
  • Codota IconGSSManager manager;String serverPrincipal;manager.createName(serverPrincipal, GSSName.NT_USER_NAME)
  • Codota IconGSSManager manager;String str;Oid mechanism;manager.createName(str, GSSName.NT_HOSTBASED_SERVICE, mechanism)
  • Codota IconGSSContext gssContext;gssContext.getSrcName()
  • Smart code suggestions by Codota
}
origin: hierynomus/sshj

  @Override
  public boolean equals(Object obj) {
    if (!(obj instanceof BogusGSSCredential)) {
      return false;
    }
    GSSName otherName = ((BogusGSSCredential) obj).name;
    return name == null ? otherName == null : name.equals((Object) otherName);
  }
}
origin: org.jglobus/gss

/**
 * Performs identity authorization. The given identity is compared
 * with the peer's identity.
 *
 * @param context the security context
 * @param host host address of the peer.
 * @exception AuthorizationException if the peer's
 *            identity does not match the expected identity.
 */
public void authorize(GSSContext context, String host)
  throws AuthorizationException {
  logger.debug("Authorization: IDENTITY");
  try {
    GSSName expected = getExpectedName(null, host);
    GSSName target = null;
    if (context.isInitiator()) {
      target = context.getTargName();
    } else {
      target = context.getSrcName();
    }
    if (!expected.equals(target)) {
      generateAuthorizationException(expected, target);
    }
  } catch (GSSException e) {
    throw new AuthorizationException("Authorization failure", e);
  }
}
origin: fr.iscpif.jglobus/gss

/**
 * Performs identity authorization. The given identity is compared
 * with the peer's identity.
 *
 * @param context the security context
 * @param host host address of the peer.
 * @exception AuthorizationException if the peer's
 *            identity does not match the expected identity.
 */
public void authorize(GSSContext context, String host)
  throws AuthorizationException {
  logger.debug("Authorization: IDENTITY");
  try {
    GSSName expected = getExpectedName(null, host);
    GSSName target = null;
    if (context.isInitiator()) {
      target = context.getTargName();
    } else {
      target = context.getSrcName();
    }
    if (!expected.equals(target)) {
      generateAuthorizationException(expected, target);
    }
  } catch (GSSException e) {
    throw new AuthorizationException("Authorization failure", e);
  }
}
origin: fr.iscpif.jglobus/gss

/**
 * Performs host authorization. If that fails, performs self authorization
 */
public void authorize(GSSContext context, String host)
throws AuthorizationException {
logger.debug("Authorization: HOST/SELF");
try {
    GSSName expected = this.hostAuthz.getExpectedName(null, host);
    GSSName target = null;
    if (context.isInitiator()) {
      target = context.getTargName();
    } else {
      target = context.getSrcName();
    }
    if (!expected.equals(target)) {
      logger.debug("Host authorization failed. Expected "
             + expected + " target is " + target);
      if (!context.getSrcName().equals(context.getTargName())) {
        if (context.isInitiator()) {
          expected = context.getSrcName();
        } else {
          expected = context.getTargName();
        }
        generateAuthorizationException(expected, target);
      }
    }
} catch (GSSException e) {
  throw new AuthorizationException("Authorization failure", e);
}
}
origin: org.jglobus/gss

/**
 * Performs host authorization. If that fails, performs self authorization
 */
public void authorize(GSSContext context, String host)
throws AuthorizationException {
logger.debug("Authorization: HOST/SELF");
try {
    GSSName expected = this.hostAuthz.getExpectedName(null, host);
    GSSName target = null;
    if (context.isInitiator()) {
      target = context.getTargName();
    } else {
      target = context.getSrcName();
    }
    if (!expected.equals(target)) {
      logger.debug("Host authorization failed. Expected "
             + expected + " target is " + target);
      if (!context.getSrcName().equals(context.getTargName())) {
        if (context.isInitiator()) {
          expected = context.getSrcName();
        } else {
          expected = context.getTargName();
        }
        generateAuthorizationException(expected, target);
      }
    }
} catch (GSSException e) {
  throw new AuthorizationException("Authorization failure", e);
}
}
origin: org.jglobus/gss

/**
 * Performs host authentication. The hostname of the peer is
 * compared with the hostname specified in the peer's (topmost)
 * certificate in the certificate chain. The hostnames must
 * match exactly (in case-insensitive way)
 *
 * @param context the security context
 * @param host host address of the peer.
 * @exception AuthorizationException if the hostnames
 *            do not match.
 */
public void authorize(GSSContext context, String host)
  throws AuthorizationException {
  logger.debug("Authorization: HOST");
  try {
    GSSName expected = getExpectedName(null, host);
    GSSName target = null;
    if (context.isInitiator()) {
      target = context.getTargName();
    } else {
      target = context.getSrcName();
    }
    if (!expected.equals(target)) {
      generateAuthorizationException(expected, target);
    }
  } catch (GSSException e) {
    throw new AuthorizationException("Authorization failure", e);
  }
}
origin: fr.iscpif.jglobus/gss

/**
 * Performs host authentication. The hostname of the peer is
 * compared with the hostname specified in the peer's (topmost)
 * certificate in the certificate chain. The hostnames must
 * match exactly (in case-insensitive way)
 *
 * @param context the security context
 * @param host host address of the peer.
 * @exception AuthorizationException if the hostnames
 *            do not match.
 */
public void authorize(GSSContext context, String host)
  throws AuthorizationException {
  logger.debug("Authorization: HOST");
  try {
    GSSName expected = getExpectedName(null, host);
    GSSName target = null;
    if (context.isInitiator()) {
      target = context.getTargName();
    } else {
      target = context.getSrcName();
    }
    if (!expected.equals(target)) {
      generateAuthorizationException(expected, target);
    }
  } catch (GSSException e) {
    throw new AuthorizationException("Authorization failure", e);
  }
}
origin: fr.iscpif.jglobus/gss

!this.expectedTargetName.equals(this.targetName)) {
throw new GlobusGSSException(GSSException.UNAUTHORIZED,
               GlobusGSSException.BAD_NAME,
origin: org.jglobus/gss

!this.expectedTargetName.equals(this.targetName)) {
throw new GlobusGSSException(GSSException.UNAUTHORIZED,
               GlobusGSSException.BAD_NAME,
origin: fr.iscpif.jglobus/gss

/**
 * Performs self authorization.
 */
public void authorize(GSSContext context, String host)
throws AuthorizationException {
logger.debug("Authorization: SELF");
try {
  if (!context.getSrcName().equals(context.getTargName())) {
  GSSName expected = null;
  GSSName target = null;
  if (context.isInitiator()) {
    expected = context.getSrcName();
    target = context.getTargName();
  } else {
    expected = context.getTargName();
    target = context.getSrcName();
  }
  generateAuthorizationException(expected, target);
  }
} catch (GSSException e) {
  throw new AuthorizationException("Authorization failure", e);
}
}
origin: org.jglobus/gss

/**
 * Performs self authorization.
 */
public void authorize(GSSContext context, String host)
throws AuthorizationException {
logger.debug("Authorization: SELF");
try {
  if (!context.getSrcName().equals(context.getTargName())) {
  GSSName expected = null;
  GSSName target = null;
  if (context.isInitiator()) {
    expected = context.getSrcName();
    target = context.getTargName();
  } else {
    expected = context.getTargName();
    target = context.getSrcName();
  }
  generateAuthorizationException(expected, target);
  }
} catch (GSSException e) {
  throw new AuthorizationException("Authorization failure", e);
}
}
org.ietf.jgssGSSNameequals

Popular methods of GSSName

  • toString
  • canonicalize
  • export
  • isAnonymous
  • hashCode

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • startActivity (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • JFrame (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now