-
Notifications
You must be signed in to change notification settings - Fork 12
Subscriber REST Responses
###Subscriber Register - /api/subscriber/register
POST Request Body
{ email: 'user@domain.com', password: 'password' }
Successful Register
{value:{}}
Registration Error Responses
Email address already in use:
{ error: { system: 'subscriber/storage', type: 'existingEmail } }
Missing Email:
{ error: { system: 'subscriber/view', type: 'missingEmail' } }
Malformed Email:
{ error: { system: 'subscriber/view', type: 'malformedEmail' } }
Missing Password:
{ error: { system: 'subscriber/view', type: 'missingPassword' } }
Malformed Password:
{ error: { system: 'subscriber/view', type: 'malformedPassword' } }
###Subscriber Verify - /api/subscriber/verify
POST Request Body
{ token: 'a verification token' }
Successful Verification Response
{ value: {} }
Verification Error Responses
Invalid Verification Token:
{ error: { system: 'subscriber/storage', type: 'unknownVerificationToken' } }
Missing Token:
{ error: { system: 'subscriber/view', type: 'missingToken' } }
###Subscriber Login - /api/subscriber/login
POST Request Body
{ email: 'user@domain.com' , password: 'apassword' }
Login Success Response
{ value: { x-access-token: 'a x-access-token' } }
Login Error Responses
Unknown Email:
{ error: { system: 'subscriber/storage', type: 'unknownEmail' } }
Invalid Password:
{ error: { system: 'subscriber/controller', type: 'invalidPassword' } }
Missing Email:
{ error: { system: 'subscriber/view', type: 'missingEmail' } }
Malformed Email:
{ error: { system: 'subscriber/view', type: 'malformedEmail' } }
Missing Password:
{ error: { system: 'subscriber/view', type: 'missingPassword' } }
Malformed Password:
{ error: { system: 'subscriber/view', type: 'malformedPassword' } }
###Subscriber Logout - /api/subscriber/logout
POST Request Header
{ x-access-token: 'your session token' }
Logout Success Response
{ value: {} }
Logout Error Responses
Invalid session token:
{ err: { system: 'subscriber/storage', type: 'unknownSessionToken' } }
[Home] (https://github.com/flowgrammable/flowsim/wiki)
[Subscriber Module] (https://github.com/flowgrammable/flowsim/wiki/Subscriber-Module)
[Packet Module] (https://github.com/flowgrammable/flowsim/wiki/packet-module)
[Profile Module] (https://github.com/flowgrammable/flowsim/wiki/profile-module)
[Switch Module] (https://github.com/flowgrammable/flowsim/wiki/Switch-Module)
[Database Module] (https://github.com/flowgrammable/flowsim/wiki/Database-Result-and-Error)
[Server Module] (https://github.com/flowgrammable/flowsim/wiki/Server-Module)
[Function Results] (https://github.com/flowgrammable/flowsim/wiki/Function-Results)
[Development Guidelines] (https://github.com/flowgrammable/flowsim/wiki/General-Guidelines)