Menambahkan konsumen tempat gerbang melakukan operasi otentikasi.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:AddGatewayAuthConsumer |
create |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| GatewayUniqueId |
string |
Yes |
ID unik gerbang. |
gw-c70622ff52fe49beb29bea9a6f52**** |
| Name |
string |
Yes |
Nama konsumen. |
name |
| Type |
string |
Yes |
Tipe otentikasi. Nilai valid:
|
JWT |
| EncodeType |
string |
No |
Tipe Enkripsi. Nilai valid:
|
RSA |
| Jwks |
string |
No |
Kunci publik JWT. Format JSON didukung. |
{"keys":[{"e":"AQAB","kid":"DHFbpoIUqrY8t2zpA2qXfCmr5VO5ZEr4RzHU_-envvQ","kty":"RSA","n":"xAE7eB6qugXyCAG3yhh7pkDkT65pHymX-P7KfIupjf59vsdo91bSP9C8H07pSAGQO1MV_xFj9VswgsCg4R6otmg5PV2He95lZdHtOcU5DXIg_pbhLdKXbi66GlVeK6ABZOUW3WYtnNHD-91gVuoeJT_DwtGGcp4ignkgXfkiEm4sw-4sfb4qdt5oLbyVpmW6x9cfa7vs2WTfURiCrBoUqgBo_-4WTiULmmHSGZHOjzwa8WtrtOQGsAFjIbno85jp6MnGGGZPYZbDAa_b3y5u-YpW7ypZrvD8BgtKVjgtQgZhLAGezMt0ua3DRrWnKqTZ0BJ_EyxOGuHJrLsn00fnMQ"}]} |
| TokenName |
string |
No |
Nama parameter yang diperlukan untuk memverifikasi setiap token. Secara default, setiap token diawali dengan Bearer dan disimpan di Header Authorization, seperti |
Authorization |
| TokenPass |
boolean |
No |
Apakah akan mengaktifkan pass-through. |
true |
| TokenPosition |
string |
No |
Posisi parameter yang diperlukan untuk memverifikasi setiap token. Secara default, setiap token diawali dengan Bearer dan disimpan di Header Authorization, seperti |
HEADER |
| TokenPrefix |
string |
No |
Prefiks parameter yang diperlukan untuk memverifikasi setiap token. Secara default, setiap token diawali dengan Bearer dan disimpan di Header Authorization, seperti |
Bearer |
| KeyName |
string |
No |
Nama kunci yang digunakan untuk otentikasi identitas berbasis JWT. |
iss |
| KeyValue |
string |
No |
Nilai kunci yang digunakan untuk otentikasi identitas berbasis JWT. |
abcd |
| Description |
string |
No |
Deskripsi konsumen. |
description |
| AcceptLanguage |
string |
No |
Bahasa tanggapan. Nilai valid:
|
zh |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
RestResult<List> |
||
| RequestId |
string |
The ID of the request. |
69AD2AA7-DB47-449B-941B-B14409DF**** |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
True |
| Code |
integer |
The status code. A value of 200 is returned if the request is successful. |
200 |
| ErrorCode |
string |
The error code that is returned. |
mse-100-000 |
| HttpStatusCode |
integer |
The HTTP status code returned. |
200 |
| Message |
string |
The error message returned. |
The request is successfully processed. |
| DynamicCode |
string |
The dynamic part in the error message. |
code |
| DynamicMessage |
string |
The dynamic part in the error message. This parameter is used to replace the Catatan
If the return value of the |
The specified parameter is invalid. |
| Data |
integer |
The ID of the consumer. |
2 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "69AD2AA7-DB47-449B-941B-B14409DF****",
"Success": true,
"Code": 200,
"ErrorCode": "mse-100-000",
"HttpStatusCode": 200,
"Message": "The request is successfully processed.\n",
"DynamicCode": "code",
"DynamicMessage": "The specified parameter is invalid.",
"Data": 2
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
| 400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
| 500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
| 404 | NotFound | Not found:%s | The resource does not exist:%s |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.