Class HelperUtil

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

public class HelperUtil extends Object
  • Constructor Details

    • HelperUtil

      public HelperUtil(String issuer, String clientId, String clientSecret, com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.springframework.web.client.RestTemplate restTemplate)
  • 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)