Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove http basic auth documentation (deprecated) #235

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 4 additions & 27 deletions _authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,11 @@ Supported parameters:

Parameter | Required | Description
------------- | -------- | -------------------------------------------------------------------------------------
client_id | yes | The application's *clientId*. Please use HTTP Basic Authentication when possible.
client_secret | yes | The application's *clientSecret*. Please use HTTP Basic Authentication when possible.
client_id | yes | The application's *clientId*.
client_secret | yes | The application's *clientSecret*.
code | yes | The code acquired in step 1.
grant_type | yes | Must be set to *'authorization_code'*.

<aside class="notice">
<strong>Important Notice</strong>: We recommend encoding the <i>clientId</i> and <i>clientSecret</i> with the HTTP Basic Authentication scheme, instead of authenticating via the request body.
</aside>

### Step 3 - Using the Access Token

> Request using the 'Authorization' header:
Expand Down Expand Up @@ -128,14 +124,10 @@ Supported parameters:

Parameter | Required | Description
------------- | -------- | -------------------------------------------------------------------------------------
client_id | yes | The application's *clientId*. Please use HTTP Basic Authentication when possible.
client_secret | yes | The application's *clientSecret*. Please use HTTP Basic Authentication when possible.
client_id | yes | The application's *clientId*.
client_secret | yes | The application's *clientSecret*.
grant_type | yes | Must be set to *'client_credentials'*.

<aside class="notice">
<strong>Important Notice</strong>: We recommend encoding the <i>clientId</i> and <i>clientSecret</i> with the HTTP Basic Authentication scheme, instead of authenticating via the request body.
</aside>

### Using the Token

> Request using the 'Authorization header':
Expand Down Expand Up @@ -261,18 +253,3 @@ curl https://api.uphold.com/v0/me \
A PAT may be used for authenticating a request via the OAuth scheme.

The `<token>` should be set as the `accessToken` received during creation.

## Basic Authentication

> Simple request using email and password:

```bash
curl https://api.uphold.com/v0/me \
-H 'OTP-Token: <OTP-Token>' \
-u <email>:<password>
```

You can use Basic Authentication by providing your email and password combination.

If OTP (One-Time Password, also known as Two-Factor Authentication) is required, then you will get a [401 HTTP error](#errors), along with the HTTP header `OTP-Token: Required`.
In which case, execute the command above again, this time passing your OTP verification code header, like so: `OTP-Token: <OTP-Token>`.