Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for isAnonymous (0.07 sec)

  1. src/test/java/jcifs/CredentialsTest.java

        void testIsAnonymous() {
            // Given
            when(mockCredentials.isAnonymous()).thenReturn(true);
    
            // When
            boolean isAnonymous = mockCredentials.isAnonymous();
    
            // Then
            assertTrue(isAnonymous);
            verify(mockCredentials).isAnonymous();
        }
    
        @Test
        @DisplayName("Should check for guest credentials")
        void testIsGuest() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/context/AbstractCIFSContextTest.java

        }
    
        @Test
        void testHasDefaultCredentials_withNonAnonymous() {
            when(mockCredentials.isAnonymous()).thenReturn(false);
            assertTrue(context.hasDefaultCredentials());
        }
    
        @Test
        void testHasDefaultCredentials_withAnonymous() {
            when(mockCredentials.isAnonymous()).thenReturn(true);
            assertFalse(context.hasDefaultCredentials());
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb/Kerb5Authenticator.java

            this.contextLifetime = time;
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.smb.CredentialsInternal#isAnonymous()
         */
        @Override
        public boolean isAnonymous() {
            return this.getSubject() == null && super.isAnonymous();
        }
    
        /**
         * {@inheritDoc}
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/CredentialsInternalTest.java

            // Assert
            assertNotSame(creds, copy, "clone must return a new instance");
            assertEquals(creds.getUserDomain(), copy.getUserDomain());
            assertEquals(creds.isAnonymous(), copy.isAnonymous());
            assertEquals(creds.isGuest(), copy.isGuest());
            assertSame(subject, copy.getSubject(), "subject is the same reference in clone");
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/NtlmPasswordAuthenticatorTest.java

            assertTrue(guestAuth.isGuest());
            assertFalse(guestAuth.isAnonymous());
    
            // Test anonymous detection
            NtlmPasswordAuthenticator anonAuth = new NtlmPasswordAuthenticator("", new char[0]);
            assertTrue(anonAuth.isAnonymous());
            assertFalse(anonAuth.isGuest());
    
            // Test user authentication
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 23.3K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/SmbSessionImpl.java

                            && (!this.credentials.isGuest() && !this.credentials.isAnonymous())) {
                        throw new SmbAuthException(NtStatus.NT_STATUS_LOGON_FAILURE);
                    }
                    if (!this.credentials.isAnonymous() && response.isLoggedInAsGuest()) {
                        anonymous = true;
                    }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 68.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/Kerb5AuthenticatorTest.java

            // Different type -> false
            assertFalse(a.equals("not-an-auth"));
        }
    
        @Test
        @DisplayName("isAnonymous: depends on subject presence and super")
        void isAnonymous_behaviour() {
            Kerb5Authenticator anon = new Kerb5Authenticator((Subject) null);
            assertTrue(anon.isAnonymous(), "Null subject with default super should be anonymous");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb1/com/SmbComSessionSetupAndX.java

            final ServerData server = negotiated.getServerData();
            if (server.security == SmbConstants.SECURITY_USER) {
                if (cred instanceof final NtlmPasswordAuthenticator a) {
                    if (a.isAnonymous()) {
                        this.lmHash = new byte[0];
                        this.ntHash = new byte[0];
                        this.capabilities &= ~SmbConstants.CAP_EXTENDED_SECURITY;
                        if (a.isGuest()) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/JAASAuthenticator.java

            this.configuration = new StaticJAASConfiguration(properties);
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.smb.Kerb5Authenticator#isAnonymous()
         */
        @Override
        public boolean isAnonymous() {
            return false;
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.smb.NtlmPasswordAuthenticator#isGuest()
         */
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbResourceLocatorImplTest.java

        }
    
        @Test
        @DisplayName("shouldForceSigning depends on config, creds, and IPC")
        void testShouldForceSigning() {
            when(config.isIpcSigningEnforced()).thenReturn(true);
            when(creds.isAnonymous()).thenReturn(false);
    
            // Case 1: share is IPC$ -> IPC
            SmbResourceLocatorImpl ipc = locator("smb://server/IPC$/");
            assertTrue(ipc.shouldForceSigning());
    
            // Case 2: config disabled
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
Back to top