Skip to content

Commit 69ab00c

Browse files
committed
chore: updates
1 parent dcc4de2 commit 69ab00c

File tree

5 files changed

+188
-0
lines changed

5 files changed

+188
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Authorization
3+
---
4+
5+
# Authorization
6+
7+
REST APIs use authorization to ensure that a client has secure access only to the resources permitted by their roles. If you are building or integrating with a 3rd party API, you can choose between Basic Auth, Bearer Tokens, and OAuth2.0.
8+
9+
Auth details can be added to a header, body, or as parameters to a request. However, if you enter your auth details in the Authorization Tab, Hoppscotch will automatically modify the relevant parts of the request based on your chosen `Auth` type. Storing Auth Credentials or Bearer Tokens as environment variables, lets you re-use these more safely and efficiently.
10+
11+
## Basic Auth
12+
13+
If the API supports basic Auth, you will have to add a verified username and password to your request. In the authorization tab, select basic auth and add your credentials.
14+
15+
## Bearer Tokens
16+
17+
Bearer tokens allow for request authentication using an access key, such as an opaque string or JWT. In the Authorization Tab, select Basic Auth and add your token, or for added security store it in a variable and reference it by name.
18+
19+
Hoppscotch will append the API key value to the text 'Bearer' and add it to the request authorization header.
20+
21+
```
22+
Bearer <Your API key>
23+
```
24+
25+
## OAuth 2.0
26+
27+
In this Authentication Model, you first retrieve an access token for the API and then use that token to authenticate future requests.
28+
29+
An example OAuth 2.0 flow could run as follows:
30+
31+
![OAuth2.0](/images/features/oauth.png)
32+
33+
### Steps
34+
35+
1. In the "**Authorization Tab**" for a request, select OAuth 2.0 from the Authorization Type drop-down.
36+
37+
::image
38+
---
39+
src: features/oauth-section
40+
extension: png
41+
alt: Hoppscotch OAuth 2.0 Authorization
42+
---
43+
::
44+
45+
2. Fill out the fields in the section below and click on "**Generate Token**" to generate a new access token.
46+
3. You can save the token to be re-used later.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: GraphQL API Testing
3+
---
4+
5+
# GraphQL API Testing
6+
7+
::image
8+
---
9+
src: features/graphql-mode
10+
extension: png
11+
alt: Hoppscotch GraphQL API Platform
12+
---
13+
::
14+
15+
Hoppscotch's GraphQL API platform provides you with the best experience to test and play around with GraphQL
16+
17+
It's primarily divided into two sections along with other features to help you build and test queries.
18+
19+
## Request
20+
21+
The request section houses the feature to enter your server endpoint and initiate a connection.
22+
23+
Once the connection is made, the `query` builder assists you in designing queries to fetch the data that you require and run it.
24+
25+
You can also add dynamic behavior to your queries by defining `variables`, `headers`, and `authorization`
26+
27+
## Response
28+
29+
This is where you see the responses to your API endpoints. You can download and copy the returned responses for further use.
30+
31+
## Other features
32+
33+
### Documentation
34+
35+
GraphQL documentation is where you can view the documentation provided by the developer
36+
37+
### Schema
38+
39+
GraphQL uses a schema to define the structure of the data, the schema explorer helps you to understand how your data is structured.
40+
41+
The GraphQL platform also houses other features like:
42+
43+
::list{type="success"}
44+
45+
- [Environments](/documentation/features/environments)
46+
- [Collections](/documentation/features/collections)
47+
- [History](/documentation/features/history)
48+
49+
::
50+
51+
:br
52+
53+
::card
54+
#title
55+
[Getting started with GraphQL](/documentation/getting-started/graphql/creating-a-query)
56+
#description
57+
Read out step by step tutorial on working with GraphQL.
58+
::
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Realtime API Testing
3+
---
4+
5+
# Realtime API Testing
6+
7+
::image
8+
---
9+
src: features/realtime-mode
10+
extension: png
11+
alt: Hoppscotch Realtime API Platform
12+
---
13+
::
14+
15+
Hoppscotch's Realtime API platform helps you test your real-time APIs easily.
16+
17+
It's primarily divided into two sections the request section and the response section.
18+
19+
## Request
20+
21+
The request section houses the feature to enter your server endpoint and initiate a connection. You also get the option to choose from four different protocols `WebSocket`, `SSE`, `Socket.IO`, and `MQTT`
22+
23+
## Response
24+
25+
Once the connection is established, you can view the responses and logs in the response section.
26+
27+
::card
28+
#title
29+
[Getting started with Realtime](/documentation/getting-started/realtime/websocket)
30+
#description
31+
Read out step by step tutorial on working with Realtime protocols.
32+
::
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: REST API Testing
3+
---
4+
5+
# REST API Testing
6+
7+
::image
8+
---
9+
src: features/rest-api-mode
10+
extension: png
11+
alt: Hoppscotch REST API Platform
12+
---
13+
::
14+
15+
Hoppscotch's REST API platform provides you with a fast and seamless experience to test and debug your API endpoints.
16+
17+
It's primarily divided into two sections along with other features to help you build better APIs.
18+
19+
## Request
20+
21+
The request section provides you the capability to define your API endpoint and initiate the communication.
22+
23+
You can select from a range of HTTP methods such as `GET`, `POST`, `PUT` etc. You can read more about HTTP methods [here](/documentation/protocols/rest).
24+
25+
You can also add dynamic behaviors to your requests by specifying `Headers`, `Request Body`, `Authorization Headers`, `Parameters`, and `Pre-request scripts`.
26+
27+
Hoppscotch also provides the capability to run `Tests` on the responses you receive.
28+
29+
## Response
30+
31+
This is where you see the responses to your API endpoints. You can download and copy the returned responses for further use.
32+
33+
## Other features
34+
35+
The REST API platform also houses other features like:
36+
37+
::list{type="success"}
38+
39+
- [Environments](/documentation/features/environments)
40+
- [Collections](/documentation/features/collections)
41+
- [History](/documentation/features/history)
42+
43+
::
44+
45+
:br
46+
47+
::card
48+
#title
49+
[Getting started with REST APIs](/documentation/getting-started/rest/creating-a-request)
50+
#description
51+
Read out step by step tutorial on working with REST APIs.
52+
::

public/images/features/oauth.png

306 KB
Loading

0 commit comments

Comments
 (0)