Package com.okta.spring.example
Class HostedLoginCodeFlowExampleApplication
- java.lang.Object
-
- com.okta.spring.example.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 Summary
Constructors Constructor Description HostedLoginCodeFlowExampleApplication()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.org.springframework.security.oauth2.client.OAuth2AuthorizedClientService
authorizedClientService()
HelperUtil
helperUtil()
IDXAuthenticationWrapper
idxClient()
static void
main(java.lang.String[] args)
com.fasterxml.jackson.databind.ObjectMapper
objectMapper()
org.springframework.web.client.RestTemplate
restTemplate()
-
-
-
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
-
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()
-
-