Ueberauth.Strategy.Atlassian.OAuth (ueberauth_atlassian v0.3.0)
Ueberauth strategy to authenticate via Atlassian.
Summary
Functions
Callback implementation for OAuth2.Strategy.authorize_url/2
.
Create a preconfigured OAuth2.Client
Access a url authenticating with the given token
Retrieves an access token by calling https://auth.atlassian.com or returns an error
Callback implementation for OAuth2.Strategy.get_token/3
.
Exchange your refresh token for a new access token.
Functions
Link to this function
authorize_url(client, params)
Callback implementation for OAuth2.Strategy.authorize_url/2
.
Link to this function
authorize_url!(params \\ [], opts \\ [])
Link to this function
client(opts \\ [])
Create a preconfigured OAuth2.Client
Link to this function
get(token, url, headers \\ [], opts \\ [])
Access a url authenticating with the given token
Link to this function
get_access_token(params \\ [], opts \\ [])
Retrieves an access token by calling https://auth.atlassian.com or returns an error
```
curl --request POST
--url 'https://auth.atlassian.com/oauth/token'
--header 'Content-Type: application/json'
--data '{"grant_type": "authorization_code",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"code": "YOUR_AUTHORIZATION_CODE",
"redirect_uri": "https://YOUR_APP_CALLBACK_URL"}'
```
Link to this function
get_token(client, params, headers)
@spec get_token(OAuth2.Client.t(), keyword(), [{binary(), binary()}]) :: OAuth2.Client.t()
Callback implementation for OAuth2.Strategy.get_token/3
.
Link to this function
refresh_access_token(refresh_token)
Exchange your refresh token for a new access token.
curl --request POST
--url 'https://auth.atlassian.com/oauth/token'
--header 'Content-Type: application/json'
--data '{ "grant_type": "refresh_token",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"refresh_token": "YOUR_REFRESH_TOKEN" }'