test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authentication/token/TokenLoginModuleTest.java
test_class.identifier: TokenLoginModuleTest
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testNullLogin() throws Exception {
          try (ContentSession cs = login(null)) {
              fail("Null login should fail");
          } catch (LoginException e) {
              // success
          }
      }
test_case.class_method_signature: TokenLoginModuleTest.testNullLogin()
test_case.full_signature: @Test public void testNullLogin()
test_case.identifier: testNullLogin
test_case.invocations: login fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNullLogin()
focal_class.declarator: log = LoggerFactory.getLogger(TokenLoginModule.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(TokenLoginModule.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: tokenProvider
focal_class.modifier: private
focal_class.original_string: private TokenProvider tokenProvider;
focal_class.type: TokenProvider
focal_class.var_name: tokenProvider
focal_class.declarator: tokenCredentials
focal_class.modifier: private
focal_class.original_string: private TokenCredentials tokenCredentials;
focal_class.type: TokenCredentials
focal_class.var_name: tokenCredentials
focal_class.declarator: tokenInfo
focal_class.modifier: private
focal_class.original_string: private TokenInfo tokenInfo;
focal_class.type: TokenInfo
focal_class.var_name: tokenInfo
focal_class.declarator: principal
focal_class.modifier: private
focal_class.original_string: private Principal principal;
focal_class.type: Principal
focal_class.var_name: principal
focal_class.declarator: principals
focal_class.modifier: private
focal_class.original_string: private Set<? extends Principal> principals;
focal_class.type: Set<? extends Principal>
focal_class.var_name: principals
focal_class.declarator: authInfo
focal_class.modifier: private
focal_class.original_string: private AuthInfo authInfo;
focal_class.type: AuthInfo
focal_class.var_name: authInfo
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authentication/token/TokenLoginModule.java
focal_class.identifier: TokenLoginModule
focal_class.class_method_signature: TokenLoginModule.login()
focal_class.full_signature: @Override public boolean login()
focal_class.identifier: login
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean login()
focal_class.class_method_signature: TokenLoginModule.commit()
focal_class.full_signature: @Override public boolean commit()
focal_class.identifier: commit
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean commit()
focal_class.class_method_signature: TokenLoginModule.logout()
focal_class.full_signature: @Override public boolean logout()
focal_class.identifier: logout
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean logout()
focal_class.class_method_signature: TokenLoginModule.getSupportedCredentials()
focal_class.full_signature: @NotNull @Override protected Set<Class> getSupportedCredentials()
focal_class.identifier: getSupportedCredentials
focal_class.modifiers: @NotNull @Override protected
focal_class.parameters: ()
focal_class.return: Set<Class>
focal_class.signature: Set<Class> getSupportedCredentials()
focal_class.class_method_signature: TokenLoginModule.clearState()
focal_class.full_signature: @Override protected void clearState()
focal_class.identifier: clearState
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearState()
focal_class.class_method_signature: TokenLoginModule.getTokenProvider()
focal_class.full_signature: @Nullable private TokenProvider getTokenProvider()
focal_class.identifier: getTokenProvider
focal_class.modifiers: @Nullable private
focal_class.parameters: ()
focal_class.return: TokenProvider
focal_class.signature: TokenProvider getTokenProvider()
focal_class.class_method_signature: TokenLoginModule.getAuthInfo(@NotNull TokenInfo tokenInfo, @NotNull Iterable<? extends Principal> principals)
focal_class.full_signature: @NotNull private static AuthInfo getAuthInfo(@NotNull TokenInfo tokenInfo, @NotNull Iterable<? extends Principal> principals)
focal_class.identifier: getAuthInfo
focal_class.modifiers: @NotNull private static
focal_class.parameters: (@NotNull TokenInfo tokenInfo, @NotNull Iterable<? extends Principal> principals)
focal_class.return: AuthInfo
focal_class.signature: AuthInfo getAuthInfo(@NotNull TokenInfo tokenInfo, @NotNull Iterable<? extends Principal> principals)
focal_class.class_method_signature: TokenLoginModule.updateSubject(@NotNull Subject subject, @NotNull TokenCredentials tc, @Nullable AuthInfo authInfo)
focal_class.full_signature: private static void updateSubject(@NotNull Subject subject, @NotNull TokenCredentials tc, @Nullable AuthInfo authInfo)
focal_class.identifier: updateSubject
focal_class.modifiers: private static
focal_class.parameters: (@NotNull Subject subject, @NotNull TokenCredentials tc, @Nullable AuthInfo authInfo)
focal_class.return: void
focal_class.signature: void updateSubject(@NotNull Subject subject, @NotNull TokenCredentials tc, @Nullable AuthInfo authInfo)
focal_class.superclass: extends AbstractLoginModule
focal_method.body: @Override
      public boolean login() throws LoginException {
          tokenProvider = getTokenProvider();
          if (tokenProvider == null) {
              return false;
          }
  
          Credentials credentials = getCredentials();
          if (credentials instanceof TokenCredentials) {
              TokenCredentials tc = (TokenCredentials) credentials;
              TokenAuthentication authentication = new TokenAuthentication(tokenProvider);
              if (authentication.authenticate(tc)) {
                  tokenCredentials = tc;
                  tokenInfo = authentication.getTokenInfo();
                  principal = authentication.getUserPrincipal();
  
                  log.debug("Login: adding login name to shared state.");
                  sharedState.put(SHARED_KEY_LOGIN_NAME, tokenInfo.getUserId());
                  return true;
              }
          }
  
          return false;
      }
focal_method.class_method_signature: TokenLoginModule.login()
focal_method.full_signature: @Override public boolean login()
focal_method.identifier: login
focal_method.invocations: getTokenProvider getCredentials authenticate getTokenInfo getUserPrincipal debug put getUserId
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: boolean
focal_method.signature: boolean login()