Class HostedLoginCodeFlowExampleApplication


  • @SpringBootApplication
    @EnableGlobalMethodSecurity(prePostEnabled=true,
                                securedEnabled=true)
    public class HostedLoginCodeFlowExampleApplication
    extends java.lang.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 Detail

      • HostedLoginCodeFlowExampleApplication

        public HostedLoginCodeFlowExampleApplication()
    • Method Detail

      • main

        public static void main​(java.lang.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
      • 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()