Class AtlassianOAuth2ClientCredentialsTokenResponseClient

java.lang.Object
com.atlassian.connect.spring.internal.request.oauth2.AtlassianOAuth2ClientCredentialsTokenResponseClient
All Implemented Interfaces:
org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient<org.springframework.security.oauth2.client.endpoint.OAuth2ClientCredentialsGrantRequest>

@Component public class AtlassianOAuth2ClientCredentialsTokenResponseClient extends Object implements org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient<org.springframework.security.oauth2.client.endpoint.OAuth2ClientCredentialsGrantRequest>
  • Constructor Summary

    Constructors
    Constructor
    Description
    AtlassianOAuth2ClientCredentialsTokenResponseClient(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder, AtlassianRequestUtils requestUtils)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse>
    getResponse(org.springframework.http.RequestEntity<?> request)
     
    org.springframework.web.client.RestTemplate
    Public to enable integration testing.
    org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse
    getTokenResponse(org.springframework.security.oauth2.client.endpoint.OAuth2ClientCredentialsGrantRequest clientCredentialsGrantRequest)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AtlassianOAuth2ClientCredentialsTokenResponseClient

      @Autowired public AtlassianOAuth2ClientCredentialsTokenResponseClient(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder, AtlassianRequestUtils requestUtils)
  • Method Details

    • getTokenResponse

      public org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse getTokenResponse(org.springframework.security.oauth2.client.endpoint.OAuth2ClientCredentialsGrantRequest clientCredentialsGrantRequest)
      Specified by:
      getTokenResponse in interface org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient<org.springframework.security.oauth2.client.endpoint.OAuth2ClientCredentialsGrantRequest>
    • getResponse

      public org.springframework.http.ResponseEntity<org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse> getResponse(org.springframework.http.RequestEntity<?> request)
    • getRestTemplate

      public org.springframework.web.client.RestTemplate getRestTemplate()
      Public to enable integration testing.
      Returns:
      the rest template used for access token requests