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
Follow these steps:
- 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.
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Basic <AuthString from Dev Portal>" \
-d '{"type": "Cima", "media_token": "<CIMA Access Token>"}' \
https://<AUTH_URL>/v1.1/login
The Token that is received as the response, is a short-lived credential generated by the server to authenticate the user. Response to a successful login request is as given below:
{
"expires_in": "240",
"id": "<555 id>",
"idmapping_count": 1,
"token": "<555 JWT Token>",
"user_data": {
"cust_guid": "<customer id>",
"email": "<email id>"
}
}
- Using the 555 JWT token received in the previous Auth Manager response, request the Identity manager for the public id and routingId of the user. Routing ID is the unique Identifier for the user.
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer <555 JWT Token>" \
https://<IDM_URL>/v1/allidentities
A successful request will give us the following details as response:
{
"public_ids": [
"<emailId>",
"<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.
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Basic <AuthString from Dev Portal>" \
-d '{"type": "Email", "email": "<Registered Email ID>", "password":"<Password>"}' \
https://<AUTH_URL>/v1.1/login
The Token that is received as the response, is a short-lived credential generated by the server to authenticate the user. Response to a successful login request is as given below:
{
"expires_in": "",
"id": "555 id",
"idmapping_count": 1,
"token": "<555 JWT Token>",
"user_data": {
"email": "<Email ID>",
"name": "<Name>"
}
}
- Using the 555 JWT token received in the previous Auth Manager response, request the Identity manager for the public id and routingId of the user. Routing ID is the unique Identifier for the user.
curl -H "Content-Type: application/json"
-H "Authorization: Bearer <555 JWT Token>"
https://<IDM_URL>/v1/allidentities
A successful request will give us the following details as response:
{
"public_ids": [
"<emailId>",
"<Telephone Number>",
],
"routing_id": "<Routing Id of the user>"
}
Keep 555 JWT Token and Routing ID handy to access the SDK APIs.
Anonymous Login
555 platform allows 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.
curl -X POST -H "Content-Type: application/json"
-H "Authorization: Basic <AuthString from Dev Portal>" \
-d '{"user_id":"anonymous user id"}'
https://<AUTH_URL>/v1.1/login/anonymous
The response for successful request for anonymous login is as:
{
"token": "<555 JWT Token>"
}
Keep 555 JWT Token and Routing ID handy to access the SDK APIs.