Class HostedLoginCodeFlowExampleApplication

java.lang.Object
com.okta.spring.example.HostedLoginCodeFlowExampleApplication

@SpringBootApplication @EnableGlobalMethodSecurity(prePostEnabled=true, securedEnabled=true) public class HostedLoginCodeFlowExampleApplication extends Object
This example renders a self-hosted login page (hosted within this application). You can use a standard login with less code (if you don't need to customize the login page) see the 'basic' example at the root of this repository.
  • Constructor Details

    • HostedLoginCodeFlowExampleApplication

      public HostedLoginCodeFlowExampleApplication()
  • Method Details

    • main

      public static void main(String[] args)
    • authenticationSuccessEventApplicationListener

      @Bean protected org.springframework.context.ApplicationListener<org.springframework.security.authentication.event.AuthenticationSuccessEvent> authenticationSuccessEventApplicationListener()
      Create an ApplicationListener that listens for successful logins and simply just logs the principal name.
      Returns:
      a new listener
    • idxClient

      @Bean public IDXAuthenticationWrapper idxClient()
    • authorizedClientService

      @Bean public org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService()
    • helperUtil

      @Bean public HelperUtil helperUtil()
    • restTemplate

      @Bean public org.springframework.web.client.RestTemplate restTemplate()
    • objectMapper

      @Bean public com.fasterxml.jackson.databind.ObjectMapper objectMapper()