- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 34 for getCredentials (0.33 seconds)
-
src/test/java/jcifs/context/AbstractCIFSContextTest.java
// Verify that the new context uses NtlmPasswordAuthenticator (guest) assertTrue(wrappedContext.getCredentials() instanceof NtlmPasswordAuthenticator); assertTrue(wrappedContext.getCredentials().isGuest()); } @Test void testGetCredentials() { assertEquals(mockCredentials, context.getCredentials()); } @Test void testHasDefaultCredentials_withNonAnonymous() {
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/internal/smb1/com/SmbComTreeConnectAndX.java
protected int writeParameterWordsWireFormat(final byte[] dst, int dstIndex) { if (this.server.security == SmbConstants.SECURITY_SHARE && this.ctx.getCredentials() instanceof NtlmPasswordAuthenticator) { final NtlmPasswordAuthenticator pwAuth = (NtlmPasswordAuthenticator) this.ctx.getCredentials(); if (isExternalAuth(pwAuth)) { this.passwordLength = 1; } else if (this.server.encryptedPasswords) {
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 7.1K bytes - Click Count (0) -
src/test/java/jcifs/DfsResolverTest.java
} @Test void testIsTrustedDomain_NoUserDomain() throws CIFSException { when(mockConfig.isDfsDisabled()).thenReturn(false); when(mockContext.getCredentials()).thenReturn(mockCredentials); when(mockCredentials.getUserDomain()).thenReturn(null); assertFalse(dfsResolver.isTrustedDomain(mockContext, "anyDomain")); } @TestCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 4.5K bytes - Click Count (0) -
src/main/java/jcifs/smb/DfsImpl.java
} private Map<String, Map<String, CacheEntry<DfsReferralDataInternal>>> getTrustedDomains(final CIFSContext tf) throws SmbAuthException { if (tf.getConfig().isDfsDisabled() || tf.getCredentials().getUserDomain() == null || tf.getCredentials().getUserDomain().isEmpty()) { return null; } if (this._domains != null && System.currentTimeMillis() > this._domains.expiration) {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 29.7K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbTreeConnection.java
try (SmbSessionImpl treesess = t.getSession()) { if (treesess.getCredentials().isAnonymous() || treesess.getCredentials().isGuest()) { // refresh anonymous session or fallback to anonymous from guest login try (SmbSessionInternal s =
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 30.4K bytes - Click Count (1) -
src/test/java/jcifs/smb/DfsImplTest.java
mockTransportPool = mock(SmbTransportPool.class); // Set up mock behaviors when(mockContext.getConfig()).thenReturn(mockConfig); when(mockContext.getCredentials()).thenReturn(mockCredentials); when(mockContext.getTransportPool()).thenReturn(mockTransportPool); when(mockConfig.getDfsTtl()).thenReturn(300L);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 5.5K bytes - Click Count (0) -
src/test/java/jcifs/smb/SimpleMemoryManagementTest.java
mockCredentialsInternal = Mockito.mock(CredentialsInternal.class); Mockito.when(mockContext.getConfig()).thenReturn(mockConfig); Mockito.when(mockContext.getCredentials()).thenReturn(mockCredentials); Mockito.when(mockCredentials.unwrap(Mockito.any())).thenReturn(mockCredentialsInternal); Mockito.when(mockCredentialsInternal.clone()).thenReturn(mockCredentialsInternal);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sun Aug 31 08:00:57 GMT 2025 - 5.7K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbSessionImplSecurityTest.java
mockCredentialsInternal = Mockito.mock(CredentialsInternal.class); Mockito.when(mockContext.getConfig()).thenReturn(mockConfig); Mockito.when(mockContext.getCredentials()).thenReturn(mockCredentials); Mockito.when(mockCredentials.unwrap(Mockito.any())).thenReturn(mockCredentialsInternal); Mockito.when(mockCredentialsInternal.clone()).thenReturn(mockCredentialsInternal);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sun Aug 31 08:00:57 GMT 2025 - 11K bytes - Click Count (0) -
src/main/java/jcifs/http/NtlmHttpURLConnection.java
message.setFlag(NtlmFlags.NTLMSSP_REQUEST_TARGET, true); } } else if (this.transportContext.getCredentials() instanceof NtlmPasswordAuthentication) { final NtlmPasswordAuthentication npa = (NtlmPasswordAuthentication) this.transportContext.getCredentials(); String domain = npa.getUserDomain(); String user = !npa.isAnonymous() ? npa.getUsername() : null;
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 25.6K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbTreeConnectionTest.java
when(config.getMaxRequestRetries()).thenReturn(2); when(config.isTraceResourceUsage()).thenReturn(false); // Mock credentials to avoid NullPointerException when(ctx.getCredentials()).thenReturn(credentials); when(credentials.getUserDomain()).thenReturn("DOMAIN"); // Mock DFS resolver when(ctx.getDfs()).thenReturn(dfsResolver); }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 13K bytes - Click Count (0)