Codota Logo
DefaultJaasAuthenticationProvider.setApplicationEventPublisher
Code IndexAdd Codota to your IDE (free)

How to use
setApplicationEventPublisher
method
in
org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider

Best Java code snippets using org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider.setApplicationEventPublisher (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-security

@Test
public void publishNullPublisher() {
  provider.setApplicationEventPublisher(null);
  AuthenticationException ae = new BadCredentialsException("Failed to login");
  provider.publishFailureEvent(token, ae);
  provider.publishSuccessEvent(token);
}
origin: spring-projects/spring-security

@Before
public void setUp() throws Exception {
  Configuration configuration = mock(Configuration.class);
  publisher = mock(ApplicationEventPublisher.class);
  log = mock(Log.class);
  provider = new DefaultJaasAuthenticationProvider();
  provider.setConfiguration(configuration);
  provider.setApplicationEventPublisher(publisher);
  provider.setAuthorityGranters(new AuthorityGranter[] { new TestAuthorityGranter() });
  provider.afterPropertiesSet();
  AppConfigurationEntry[] aces = new AppConfigurationEntry[] { new AppConfigurationEntry(
      TestLoginModule.class.getName(), LoginModuleControlFlag.REQUIRED,
      Collections.<String, Object> emptyMap()) };
  when(configuration.getAppConfigurationEntry(provider.getLoginContextName()))
      .thenReturn(aces);
  token = new UsernamePasswordAuthenticationToken("user", "password");
  ReflectionTestUtils.setField(provider, "log", log);
}
org.springframework.security.authentication.jaasDefaultJaasAuthenticationProvidersetApplicationEventPublisher

Popular methods of DefaultJaasAuthenticationProvider

  • getLoginContextName
  • getConfiguration
  • afterPropertiesSet
  • authenticate
  • setAuthorityGranters
  • setConfiguration
    Sets the Configuration to use for Authentication.
  • <init>
  • handleLogout
  • onApplicationEvent
  • publishFailureEvent
  • publishSuccessEvent
  • publishSuccessEvent

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getApplicationContext (Context)
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Socket (java.net)
    Provides a client-side TCP socket.
  • JButton (javax.swing)
  • JList (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now