Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 18 for getCredentials (0.08 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. src/test/java/jcifs/context/CIFSContextCredentialWrapperTest.java

            // We can directly test getCredentials() to ensure it returns the initial credentials.
            assertEquals(mockCredentials, wrapper.getCredentials(), "Initial credentials should be set by constructor");
        }
    
        @Test
        @DisplayName("Should return the credentials provided in the constructor")
        void testGetCredentials() {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.4K bytes
    - Click Count (0)
  2. src/test/java/jcifs/context/CIFSContextWrapperTest.java

        }
    
        @Test
        void testGetCredentials() {
            // Test getCredentials() method
            Credentials mockCredentials = mock(Credentials.class);
            when(mockDelegate.getCredentials()).thenReturn(mockCredentials);
            assertEquals(mockCredentials, cifsContextWrapper.getCredentials());
            verify(mockDelegate).getCredentials();
        }
    
        @Test
        void testGetUrlHandler() {
    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)
  3. src/test/java/jcifs/smb/CredentialsInternalTest.java

                }
                // Exercise interaction with dependency for verification purposes
                // These methods do not throw and allow interaction checks.
                tc.getConfig();
                tc.getCredentials();
    
                // Minimal behavior: return a mock SSPContext with lenient stubbing
                SSPContext ctx = mock(SSPContext.class);
                lenient().when(ctx.isEstablished()).thenReturn(false);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 9.9K bytes
    - Click Count (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/test/java/jcifs/smb/CriticalPerformanceTest.java

            mockConfig = Mockito.mock(Configuration.class);
            mockCredentials = Mockito.mock(Credentials.class);
    
            Mockito.when(mockContext.getConfig()).thenReturn(mockConfig);
            Mockito.when(mockContext.getCredentials()).thenReturn(mockCredentials);
    
            // Mock CredentialsInternal for session tests
            jcifs.smb.CredentialsInternal mockCredentialsInternal = Mockito.mock(jcifs.smb.CredentialsInternal.class);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 15.3K bytes
    - Click Count (0)
  10. src/test/java/jcifs/smb/SmbTransportPoolImplTest.java

            pool = new SmbTransportPoolImpl();
    
            // Setup default mock behaviors
            when(ctx.getConfig()).thenReturn(config);
            when(ctx.getNameServiceClient()).thenReturn(nameSvc);
            when(ctx.getCredentials()).thenReturn(creds);
            when(ctx.getTransportPool()).thenReturn(pool);
    
            // Default config values
            when(config.getLocalAddr()).thenReturn(null);
            when(config.getLocalPort()).thenReturn(0);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 19.2K bytes
    - Click Count (0)
Back to Top