Package com.okta.spring.example
Class HelperUtil
java.lang.Object
com.okta.spring.example.HelperUtil
-
Constructor Summary
ConstructorDescriptionHelperUtil
(String issuer, String clientId, String clientSecret, com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.springframework.web.client.RestTemplate restTemplate) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.core.OAuth2AccessToken
buildOAuth2AccessToken
(com.fasterxml.jackson.databind.JsonNode node) org.springframework.security.oauth2.core.OAuth2RefreshToken
buildOAuth2RefreshToken
(com.fasterxml.jackson.databind.JsonNode node) com.fasterxml.jackson.databind.JsonNode
exchangeCodeForToken
(String interactionCode, String codeVerifier) getUserAttributes
(String uri, org.springframework.security.oauth2.core.OAuth2AccessToken oAuth2AccessToken) Collection
<? extends org.springframework.security.core.GrantedAuthority> tokenScopesToAuthorities
(org.springframework.security.oauth2.core.OAuth2AccessToken accessToken)
-
Constructor Details
-
HelperUtil
-
-
Method Details
-
getUserAttributes
public Map<String,Object> getUserAttributes(String uri, org.springframework.security.oauth2.core.OAuth2AccessToken oAuth2AccessToken) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
exchangeCodeForToken
public com.fasterxml.jackson.databind.JsonNode exchangeCodeForToken(String interactionCode, String codeVerifier) throws MalformedURLException - Throws:
MalformedURLException
-
buildOAuth2AccessToken
public org.springframework.security.oauth2.core.OAuth2AccessToken buildOAuth2AccessToken(com.fasterxml.jackson.databind.JsonNode node) -
buildOAuth2RefreshToken
public org.springframework.security.oauth2.core.OAuth2RefreshToken buildOAuth2RefreshToken(com.fasterxml.jackson.databind.JsonNode node) -
tokenScopesToAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> tokenScopesToAuthorities(org.springframework.security.oauth2.core.OAuth2AccessToken accessToken)
-