User Authentication
Login to 555
Currently, 555 platform provides various types of authentication like login through email, facebook, CIMA token. In this document, let us look into the below options:
Login with Xfinity
- Use Xfinity credentials to login and get CIMA token
- Use
AuthString
from app domain created on Developer Portal and make a request to the Auth Manager to get the 555 JWT token.
Request:
HTTP POST https://<AUTH_URL>/v1.1/login
Headers:
Content-Type: application/json;
Authorization: Basic <AuthString from Dev Portal>
User-Agent: <App name>/<App version><space><System http agent>
Requestbody:
{"type":"Cima","media_token":"<CIMA Access Token>"}
The Token that is received in the response, is a short-lived credential generated by server to authenticate the user. Response to a successful login request is given below:
Response:
200 OK https://<AUTH_URL>/v1.1/login
Content-Type: application/json
Responsebody:
{"expires_in":"240","id":"<555 id>","idmapping_count":1,"token": <JWT token>,"user_data":{"cust_guid":"<customer id>","email":"<email id>"}}
- Using the 555 JWT token received in the Auth Manager response, make a request to the Identity manager to get the public id and routingId of the user. Routing ID is the unique Identifier for the user.
Request:
HTTP GET https://<IDM_URL>/v1/allidentities
Authorization: Bearer <555 JWT token>
User-Agent: <App name>/<App version><space><System http agent>
A successful request will give us the following details as response:
Response:
200 OK https://<IDM_URL>/v1/allidentities
Content-Type: application/json
Responsebody:
{"public_ids":["<user email id>","<Telephone number>","<emailId2>"],"routing_id":"<routing id of the user>"}
Keep 555 JWT Token and Routing ID handy to access the SDK APIs.
Login via Email
Login via Email involves following steps:
- Use 555 credentials to login
- Use
AuthString
from app domain created on Developer Portal and make a request to the Auth Manager for the 555 JWT token.
Request:
HTTP POST https://<AUTH_URL>/v1.1/login
Headers:
Content-Type: application/json;
Authorization: Basic <AuthString from Dev Portal>
User-Agent: <App name>/<App version><space><System http agent>
Requestbody:
{"type":"Email","email":"<Registered Email ID>","password":"<Password>"}
The Token that is received in the response, is a short-lived credential generated by server to authenticate the user. Response to a successful login request is given below:
Response:
200 OK https://<AUTH_URL>/v1.1/login
Content-Type: application/json
Responsebody:
{"expires_in":"<expires in>","id":"<555 id>","idmapping_count":1,"token":<555 JWT token>,"user_data":{"name":"<Name>","email":"<Registered email id>"}}
- Using the 555 JWT token received in the Auth Manager response, make a request to the Identity manager to get the public id and routingId of the user. Routing ID is the unique Identifier for the user.
Request:
HTTP GET https://<IDM_URL>/v1/allidentities
Authorization: Bearer <555 JWT token>
User-Agent: <App name>/<App version><space><System http agent>
A successful request will give us the following details as response:
Response:
200 OK https://<IDM_URL>/v1/allidentities
Content-Type: application/json
Responsebody:
{"public_ids":["<user email id>","<Telephone number>"],"routing_id":"<routing id of the user>"}""]]
Keep 555 JWT Token and Routing ID handy to access the SDK APIs.
Anonymous Login
Android SDK gives an option for the non-registered users to connect anonymously to the server, to perform a video call or chat.For this case user has to provide a random routing Id as 'user_id' to get a 555 JWT Token. A user_id or routingid can be
a random uuid in the format <uuid>@<appdomain>
app domain is from developer portal.
Request:
POST https://<AUTH_URL>/v1.1/login/anonymous
Content-Type: application/json;
Authorization: Basic <AuthString from Dev Portal>
Requestbody:
{"user_id":"<anonymous user id>"}
Response to a successful login request is given below:
Response:
200 OK https://<AUTH_URL>/v1.1/login/anonymous
Content-Type: application/json
{"token":"<555 JWT Token>"}
Keep 555 JWT Token and Routing ID handy to access the SDK APIs.