Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Exchanges an access code for a token.
Synopsis
- data ExchangeCodeForToken = ExchangeCodeForToken' {}
- newExchangeCodeForToken :: TokenProviders -> ExchangeCodeForTokenRequestBody -> ExchangeCodeForToken
- exchangeCodeForToken_provider :: Lens' ExchangeCodeForToken TokenProviders
- exchangeCodeForToken_request :: Lens' ExchangeCodeForToken ExchangeCodeForTokenRequestBody
- data ExchangeCodeForTokenResponse = ExchangeCodeForTokenResponse' {}
- newExchangeCodeForTokenResponse :: Int -> Text -> Int -> Text -> ExchangeCodeForTokenResponse
- exchangeCodeForTokenResponse_httpStatus :: Lens' ExchangeCodeForTokenResponse Int
- exchangeCodeForTokenResponse_accessToken :: Lens' ExchangeCodeForTokenResponse Text
- exchangeCodeForTokenResponse_expiresIn :: Lens' ExchangeCodeForTokenResponse Int
- exchangeCodeForTokenResponse_refreshToken :: Lens' ExchangeCodeForTokenResponse Text
Creating a Request
data ExchangeCodeForToken Source #
See: newExchangeCodeForToken
smart constructor.
ExchangeCodeForToken' | |
|
Instances
newExchangeCodeForToken Source #
Create a value of ExchangeCodeForToken
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:provider:ExchangeCodeForToken'
, exchangeCodeForToken_provider
- The third-party provider for the token. The only valid value is figma
.
$sel:request:ExchangeCodeForToken'
, exchangeCodeForToken_request
- Describes the configuration of the request.
Request Lenses
exchangeCodeForToken_provider :: Lens' ExchangeCodeForToken TokenProviders Source #
The third-party provider for the token. The only valid value is figma
.
exchangeCodeForToken_request :: Lens' ExchangeCodeForToken ExchangeCodeForTokenRequestBody Source #
Describes the configuration of the request.
Destructuring the Response
data ExchangeCodeForTokenResponse Source #
See: newExchangeCodeForTokenResponse
smart constructor.
ExchangeCodeForTokenResponse' | |
|
Instances
newExchangeCodeForTokenResponse Source #
:: Int | |
-> Text | |
-> Int | |
-> Text | |
-> ExchangeCodeForTokenResponse |
Create a value of ExchangeCodeForTokenResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:ExchangeCodeForTokenResponse'
, exchangeCodeForTokenResponse_httpStatus
- The response's http status code.
$sel:accessToken:ExchangeCodeForTokenResponse'
, exchangeCodeForTokenResponse_accessToken
- The access token.
$sel:expiresIn:ExchangeCodeForTokenResponse'
, exchangeCodeForTokenResponse_expiresIn
- The date and time when the new access token expires.
$sel:refreshToken:ExchangeCodeForTokenResponse'
, exchangeCodeForTokenResponse_refreshToken
- The token to use to refresh a previously issued access token that might
have expired.
Response Lenses
exchangeCodeForTokenResponse_httpStatus :: Lens' ExchangeCodeForTokenResponse Int Source #
The response's http status code.
exchangeCodeForTokenResponse_accessToken :: Lens' ExchangeCodeForTokenResponse Text Source #
The access token.
exchangeCodeForTokenResponse_expiresIn :: Lens' ExchangeCodeForTokenResponse Int Source #
The date and time when the new access token expires.
exchangeCodeForTokenResponse_refreshToken :: Lens' ExchangeCodeForTokenResponse Text Source #
The token to use to refresh a previously issued access token that might have expired.