- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for withCredentials (0.17 sec)
-
src/main/java/jcifs/context/AbstractCIFSContext.java
*/ @Override public CIFSContext withCredentials(final Credentials creds) { return new CIFSContextCredentialWrapper(this, creds); } /** * * {@inheritDoc} * * @see jcifs.CIFSContext#withAnonymousCredentials() */ @Override public CIFSContext withAnonymousCredentials() { return withCredentials(new NtlmPasswordAuthenticator()); } /**
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 4K bytes - Viewed (0) -
src/test/java/jcifs/CIFSContextTest.java
CIFSContext newContext = mock(CIFSContext.class); when(mockContext.withCredentials(creds)).thenReturn(newContext); // When CIFSContext context = mockContext.withCredentials(creds); // Then assertEquals(newContext, context); verify(mockContext).withCredentials(creds); } @Test @DisplayName("Should renew credentials")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.8K bytes - Viewed (0) -
src/test/java/jcifs/context/CIFSContextWrapperTest.java
@Test void testWithCredentials() { // Test withCredentials(Credentials creds) method Credentials mockCredentials = mock(Credentials.class); CIFSContext mockNewContext = mock(CIFSContext.class); when(mockDelegate.withCredentials(mockCredentials)).thenReturn(mockNewContext); assertEquals(mockNewContext, cifsContextWrapper.withCredentials(mockCredentials));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10.7K bytes - Viewed (0) -
src/main/java/jcifs/context/CIFSContextWrapper.java
@Override public boolean hasDefaultCredentials() { return this.delegate.hasDefaultCredentials(); } @Override public CIFSContext withCredentials(final Credentials creds) { return wrap(this.delegate.withCredentials(creds)); } @Override public CIFSContext withDefaultCredentials() { return wrap(this.delegate.withDefaultCredentials()); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 4.9K bytes - Viewed (0) -
src/main/java/jcifs/CIFSContext.java
* 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 * {@link jcifs.context.CIFSContextWrapper} to get forward compatibility.
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 4.9K bytes - Viewed (0) -
src/test/java/jcifs/context/AbstractCIFSContextTest.java
} } @Test void testWithCredentials() { Credentials newCreds = mock(Credentials.class); CIFSContext wrappedContext = context.withCredentials(newCreds); assertNotNull(wrappedContext); assertTrue(wrappedContext instanceof CIFSContextCredentialWrapper); // Verify that the new context uses the provided credentials
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7K bytes - Viewed (0) -
README.md
CIFSContext context = new BaseContext(new jcifs.config.PropertyConfiguration()); NtlmPasswordAuthenticator auth = new NtlmPasswordAuthenticator("domain", "username", "password"); CIFSContext authContext = context.withCredentials(auth); // Use authenticated context try (SmbFile file = new SmbFile("smb://server/share/", authContext)) { for (SmbFile f : file.listFiles()) { System.out.println(f.getName()); } } ```
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 09:24:52 UTC 2025 - 6.2K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/client/smb/SmbClient.java
Registered: Sun Sep 21 03:50:09 UTC 2025 - Last Modified: Thu Sep 18 09:30:45 UTC 2025 - 22.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbFileIntegrationTest.java
try { NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(SingletonContext.getInstance(), WORKGROUP, USERNAME, PASSWORD); context = SingletonContext.getInstance().withCredentials(auth); } catch (Exception e) { log.warn("Failed to create authenticated context, trying guest access", e); context = SingletonContext.getInstance(); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 56K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbFile.java
*/ @Deprecated public SmbFile(final URL url) throws MalformedURLException { this(url, SingletonContext.getInstance() .withCredentials(new NtlmPasswordAuthentication(SingletonContext.getInstance(), url.getUserInfo()))); } /** * Constructs an SmbFile representing a resource on an SMB network such
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 103.2K bytes - Viewed (0)