mirror of
https://github.com/cadmium-im/cadmium-docs-legacy.git
synced 2024-11-22 02:12:21 +00:00
Change auth message type id in core specs
This commit is contained in:
parent
4772755006
commit
f78c12a8b0
@ -235,8 +235,8 @@ Authorization has multiple types which described in this document. Auth flow can
|
|||||||
|
|
||||||
### 6.2. Authorization types
|
### 6.2. Authorization types
|
||||||
|
|
||||||
- `urn:cadmium:auth:types:login_password` - simple login/pass authorization
|
- `urn:cadmium:auth:login_password` - simple login/pass authorization
|
||||||
- `urn:cadmium:auth:types:token` - authorization by token
|
- `urn:cadmium:auth:token` - authorization by token
|
||||||
|
|
||||||
### 6.3. Common Flow
|
### 6.3. Common Flow
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ C->S:
|
|||||||
"type": "urn:cadmium:auth",
|
"type": "urn:cadmium:auth",
|
||||||
"to": ["cadmium.org"],
|
"to": ["cadmium.org"],
|
||||||
"payload": {
|
"payload": {
|
||||||
"type": "urn:cadmium:auth:types:login_password",
|
"type": "urn:cadmium:auth:login_password",
|
||||||
"fields": {
|
"fields": {
|
||||||
"username": "juliet",
|
"username": "juliet",
|
||||||
"password": "romeo1"
|
"password": "romeo1"
|
||||||
@ -284,7 +284,7 @@ C->S:
|
|||||||
"type": "urn:cadmium:auth",
|
"type": "urn:cadmium:auth",
|
||||||
"to": ["cadmium.org"],
|
"to": ["cadmium.org"],
|
||||||
"payload": {
|
"payload": {
|
||||||
"type": "urn:cadmium:auth:types:token",
|
"type": "urn:cadmium:auth:token",
|
||||||
"fields": {
|
"fields": {
|
||||||
"token": "3b5135a5-aff5-4396-a629-a254f383e82f",
|
"token": "3b5135a5-aff5-4396-a629-a254f383e82f",
|
||||||
}
|
}
|
||||||
@ -314,11 +314,13 @@ interface AuthReq {
|
|||||||
|
|
||||||
interface AuthFields {}
|
interface AuthFields {}
|
||||||
|
|
||||||
|
// urn:cadmium:auth:login_password
|
||||||
interface LoginPassFields : AuthFields {
|
interface LoginPassFields : AuthFields {
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// urn:cadmium:auth:token
|
||||||
interface TokenFields : AuthFields {
|
interface TokenFields : AuthFields {
|
||||||
token: string;
|
token: string;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user