Tabnine Logo
NtlmAuthenticator.getDefault
Code IndexAdd Tabnine to your IDE (free)

How to use
getDefault
method
in
jcifs.smb.NtlmAuthenticator

Best Java code snippets using jcifs.smb.NtlmAuthenticator.getDefault (Showing top 2 results out of 315)

origin: org.codelibs/jcifs

  /**
   * {@inheritDoc}
   *
   * @see jcifs.CIFSContext#renewCredentials(java.lang.String, java.lang.Throwable)
   */
  @Override
  public boolean renewCredentials ( String locationHint, Throwable error ) {
    Credentials cred = getCredentials();
    if ( cred instanceof SmbRenewableCredentials ) {
      SmbRenewableCredentials renewable = (SmbRenewableCredentials) cred;
      CredentialsInternal renewed = renewable.renew();
      if ( renewed != null ) {
        this.creds = renewed;
        return true;
      }
    }
    NtlmAuthenticator auth = NtlmAuthenticator.getDefault();
    if ( auth != null ) {
      NtlmPasswordAuthenticator newAuth = NtlmAuthenticator
          .requestNtlmPasswordAuthentication(auth, locationHint, ( error instanceof SmbAuthException ) ? (SmbAuthException) error : null);
      if ( newAuth != null ) {
        this.creds = newAuth;
        return true;
      }
    }
    return false;
  }
}
origin: AgNO3/jcifs-ng

  /**
   * {@inheritDoc}
   *
   * @see jcifs.CIFSContext#renewCredentials(java.lang.String, java.lang.Throwable)
   */
  @Override
  public boolean renewCredentials ( String locationHint, Throwable error ) {
    Credentials cred = getCredentials();
    if ( cred instanceof SmbRenewableCredentials ) {
      SmbRenewableCredentials renewable = (SmbRenewableCredentials) cred;
      CredentialsInternal renewed = renewable.renew();
      if ( renewed != null ) {
        this.creds = renewed;
        return true;
      }
    }
    NtlmAuthenticator auth = NtlmAuthenticator.getDefault();
    if ( auth != null ) {
      NtlmPasswordAuthenticator newAuth = NtlmAuthenticator
          .requestNtlmPasswordAuthentication(auth, locationHint, ( error instanceof SmbAuthException ) ? (SmbAuthException) error : null);
      if ( newAuth != null ) {
        this.creds = newAuth;
        return true;
      }
    }
    return false;
  }
}
jcifs.smbNtlmAuthenticatorgetDefault

Popular methods of NtlmAuthenticator

  • getNtlmPasswordAuthentication
    An application extending this class must provide an implementation for this method that returns new
  • requestNtlmPasswordAuthentication

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Table (org.hibernate.mapping)
    A relational table
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now