- Sort Score
- Num 10 results
- Language All
Results 1 - 8 of 8 for withDefaultCredentials (0.98 seconds)
-
src/test/java/jcifs/context/CIFSContextWrapperTest.java
@Test void testWithDefaultCredentials() { // Test withDefaultCredentials() method CIFSContext mockNewContext = mock(CIFSContext.class); when(mockDelegate.withDefaultCredentials()).thenReturn(mockNewContext); assertEquals(mockNewContext, cifsContextWrapper.withDefaultCredentials()); verify(mockDelegate).withDefaultCredentials(); } @Test void testWithAnonymousCredentials() {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 10.7K bytes - Click Count (0) -
src/main/java/jcifs/context/AbstractCIFSContext.java
return withCredentials(new NtlmPasswordAuthenticator()); } /** * {@inheritDoc} * * @see jcifs.CIFSContext#withDefaultCredentials() */ @Override public CIFSContext withDefaultCredentials() { return withCredentials(getDefaultCredentials()); } /** * {@inheritDoc} * * @see jcifs.CIFSContext#withGuestCrendentials()
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 4K bytes - Click Count (0) -
src/main/java/jcifs/CIFSContext.java
* * Usually you will want to create one context per client configuration and then * multiple sub-contexts using different credentials (if necessary). * * {@link #withDefaultCredentials()}, {@link #withAnonymousCredentials()}, {@link #withCredentials(Credentials)} * allow to create such sub-contexts. * * * Implementors of this interface should extend {@link jcifs.context.BaseContext} or
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 4.9K bytes - Click Count (0) -
src/main/java/jcifs/context/CIFSContextWrapper.java
public CIFSContext withCredentials(final Credentials creds) { return wrap(this.delegate.withCredentials(creds)); } @Override public CIFSContext withDefaultCredentials() { return wrap(this.delegate.withDefaultCredentials()); } @Override public CIFSContext withAnonymousCredentials() { return wrap(this.delegate.withAnonymousCredentials()); } @Override
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 4.9K bytes - Click Count (0) -
src/test/java/jcifs/CIFSContextTest.java
// Given CIFSContext newContext = mock(CIFSContext.class); when(mockContext.withDefaultCredentials()).thenReturn(newContext); // When CIFSContext context = mockContext.withDefaultCredentials(); // Then assertEquals(newContext, context); verify(mockContext).withDefaultCredentials(); } @Test @DisplayName("Should get context with anonymous credentials")Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 8.8K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbSessionImpl.java
/* * preauthentication */ try (SmbSessionImpl smbSession = trans.getSmbSession(getContext().withDefaultCredentials()); SmbTreeImpl t = smbSession.getSmbTree(getContext().getConfig().getLogonShare(), null)) { t.treeConnect(null, null); }Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sun Aug 31 08:00:57 GMT 2025 - 68.9K bytes - Click Count (0) -
src/test/java/jcifs/context/AbstractCIFSContextTest.java
assertTrue(wrappedContext.getCredentials().isAnonymous()); } @Test void testWithDefaultCredentials() { CIFSContext wrappedContext = context.withDefaultCredentials(); assertNotNull(wrappedContext); assertTrue(wrappedContext instanceof CIFSContextCredentialWrapper); // Verify that the new context uses the default credentials provided to the test context
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 7K bytes - Click Count (0) -
src/main/java/jcifs/http/NtlmHttpFilter.java
Skipping DC interrogation."""); } else { try (SmbSessionInternal ssn = trans.getSmbSession(tf.withDefaultCredentials()).unwrap(SmbSessionInternal.class)) { ssn.treeConnectLogon(); } } return new NtlmChallenge(trans.getServerEncryptionKey(), dc);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 15.3K bytes - Click Count (0)