From f78c12a8b02d1aa55e4ce0175564a92478576ed5 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Mon, 8 Mar 2021 16:07:58 +0300 Subject: [PATCH] Change auth message type id in core specs --- protocol-spec/core.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/protocol-spec/core.md b/protocol-spec/core.md index 39ec4e5..d5234f8 100644 --- a/protocol-spec/core.md +++ b/protocol-spec/core.md @@ -235,8 +235,8 @@ Authorization has multiple types which described in this document. Auth flow can ### 6.2. Authorization types -- `urn:cadmium:auth:types:login_password` - simple login/pass authorization -- `urn:cadmium:auth:types:token` - authorization by token +- `urn:cadmium:auth:login_password` - simple login/pass authorization +- `urn:cadmium:auth:token` - authorization by token ### 6.3. Common Flow @@ -252,7 +252,7 @@ C->S: "type": "urn:cadmium:auth", "to": ["cadmium.org"], "payload": { - "type": "urn:cadmium:auth:types:login_password", + "type": "urn:cadmium:auth:login_password", "fields": { "username": "juliet", "password": "romeo1" @@ -284,7 +284,7 @@ C->S: "type": "urn:cadmium:auth", "to": ["cadmium.org"], "payload": { - "type": "urn:cadmium:auth:types:token", + "type": "urn:cadmium:auth:token", "fields": { "token": "3b5135a5-aff5-4396-a629-a254f383e82f", } @@ -314,11 +314,13 @@ interface AuthReq { interface AuthFields {} +// urn:cadmium:auth:login_password interface LoginPassFields : AuthFields { username: string; password: string; } +// urn:cadmium:auth:token interface TokenFields : AuthFields { token: string; }