226 lines
6.2 KiB
JSON
226 lines
6.2 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "9f8dcf04-ff26-48a8-bb0f-bc5294c6f001",
|
|
"name": "Gapido Auth gRPC",
|
|
"description": "Collection-style reference for the Gapido Auth gRPC service. Use Postman's gRPC request builder with proto/gapido_auth/generated/auth.proto. Standard Postman collection JSON is HTTP-oriented, so these items document the gRPC method names, metadata, and request payloads.",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "RequestOtp",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "grpc://{{grpc_host}}/gapido.auth.v1.AuthService/RequestOtp",
|
|
"protocol": "grpc",
|
|
"host": [
|
|
"{{grpc_host}}"
|
|
],
|
|
"path": [
|
|
"gapido.auth.v1.AuthService",
|
|
"RequestOtp"
|
|
]
|
|
},
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"mobile\": \"{{mobile}}\",\n \"purpose\": \"{{purpose}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"description": "gRPC method: gapido.auth.v1.AuthService/RequestOtp. Public method. In debug SMS mode, fetch the OTP from the demo UI or Redis debug key."
|
|
}
|
|
},
|
|
{
|
|
"name": "VerifyOtp",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "grpc://{{grpc_host}}/gapido.auth.v1.AuthService/VerifyOtp",
|
|
"protocol": "grpc",
|
|
"host": [
|
|
"{{grpc_host}}"
|
|
],
|
|
"path": [
|
|
"gapido.auth.v1.AuthService",
|
|
"VerifyOtp"
|
|
]
|
|
},
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"mobile\": \"{{mobile}}\",\n \"code\": \"{{otp_code}}\",\n \"purpose\": \"{{purpose}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"description": "gRPC method: gapido.auth.v1.AuthService/VerifyOtp. Save access_token and refresh_token from the response into the Postman environment."
|
|
}
|
|
},
|
|
{
|
|
"name": "RefreshToken",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "grpc://{{grpc_host}}/gapido.auth.v1.AuthService/RefreshToken",
|
|
"protocol": "grpc",
|
|
"host": [
|
|
"{{grpc_host}}"
|
|
],
|
|
"path": [
|
|
"gapido.auth.v1.AuthService",
|
|
"RefreshToken"
|
|
]
|
|
},
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"refresh_token\": \"{{refresh_token}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"description": "gRPC method: gapido.auth.v1.AuthService/RefreshToken. This rotates the refresh token; replace both token variables after a successful response."
|
|
}
|
|
},
|
|
{
|
|
"name": "RevokeRefreshToken",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "authorization",
|
|
"value": "Bearer {{access_token}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "grpc://{{grpc_host}}/gapido.auth.v1.AuthService/RevokeRefreshToken",
|
|
"protocol": "grpc",
|
|
"host": [
|
|
"{{grpc_host}}"
|
|
],
|
|
"path": [
|
|
"gapido.auth.v1.AuthService",
|
|
"RevokeRefreshToken"
|
|
]
|
|
},
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"refresh_token\": \"{{refresh_token}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"description": "gRPC method: gapido.auth.v1.AuthService/RevokeRefreshToken. Metadata: authorization = Bearer {{access_token}}."
|
|
}
|
|
},
|
|
{
|
|
"name": "PublicPing",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "grpc://{{grpc_host}}/gapido.auth.v1.AuthService/PublicPing",
|
|
"protocol": "grpc",
|
|
"host": [
|
|
"{{grpc_host}}"
|
|
],
|
|
"path": [
|
|
"gapido.auth.v1.AuthService",
|
|
"PublicPing"
|
|
]
|
|
},
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"description": "gRPC method: gapido.auth.v1.AuthService/PublicPing. Public method."
|
|
}
|
|
},
|
|
{
|
|
"name": "UserOnly",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "authorization",
|
|
"value": "Bearer {{access_token}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "grpc://{{grpc_host}}/gapido.auth.v1.AuthService/UserOnly",
|
|
"protocol": "grpc",
|
|
"host": [
|
|
"{{grpc_host}}"
|
|
],
|
|
"path": [
|
|
"gapido.auth.v1.AuthService",
|
|
"UserOnly"
|
|
]
|
|
},
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"description": "gRPC method: gapido.auth.v1.AuthService/UserOnly. Metadata: authorization = Bearer {{access_token}}."
|
|
}
|
|
},
|
|
{
|
|
"name": "AdminOnly",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "authorization",
|
|
"value": "Bearer {{access_token}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "grpc://{{grpc_host}}/gapido.auth.v1.AuthService/AdminOnly",
|
|
"protocol": "grpc",
|
|
"host": [
|
|
"{{grpc_host}}"
|
|
],
|
|
"path": [
|
|
"gapido.auth.v1.AuthService",
|
|
"AdminOnly"
|
|
]
|
|
},
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"description": "gRPC method: gapido.auth.v1.AuthService/AdminOnly. Metadata: authorization = Bearer {{access_token}}. Requires the configured admin mobile."
|
|
}
|
|
}
|
|
]
|
|
}
|
|
|