The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter discusses these Cisco Pulse OpenSocial JavaScript API authentication topics:
•Cisco Pulse Authentication JavaScript APIs
If you are implementing a gadget to run on a third-party OpenSocial platform, you must create a security token and pass along the value as a parameter in your request. For more information on creating a security token, see the "Security Token" section.
If you are implementing a gadget to run on the Cisco Pulse platform, you do not need to explicitly create a security token. The OpenSocial server automatically appends a security token to your request.
Authentication requests are in HTTPS format.
These topics includes additional information about authentication:
Cisco Pulse gadget users must be authenticated by the OpenSocial server. These users must be Cisco Pulse users with a privilege level of user, business administrator, or system administrator. If they are not currently Cisco Pulse users, they can contact the Cisco Pulse system administrator.
Related Topics
These guidelines exist for a session with the Cisco Pulse server:
•A session is valid for a period of 24 hours.
•During this period, you can log out, and if you log back in within the period, the session is renewed for another 24 hours.
•If you send a request after the session has expired, the server returns an error.
•If a session expires, you must send another request to log into the OpenSocial server.
Related Topics
If you are implementing a gadget on a third-party platform, you must create a security token, which is comprised of seven attributes. Each attribute must be followed by a colon (:) as shown:
owner-id:viewer-id:app-id:domain:app-url:module-id:container-id:
where:
owner-id and viewer-id = Your Cisco Pulse login username.
app-id = The default value of 1111.
domain = The default value of CISCOPULSE.
app-url = The service URL, for example, http://host-name:port-number/gadgets/path-to-gadget.xml.
module-id = The default value of 0.
container-id = The default value of default.
You must encode (UTF-8) all attributes except the app-url attribute once, and the app-url attribute twice to ensure the entire token is a valid URL format.
A sample security token is as follows:
george@mycompany.com%3Ageorge@mycompany%3A1111%3ACISCOPULSE%3Ahttp://myhost1:7090/gadgets/group_sample.xml%3Adefault%3A
This token should remain valid indefinitely.
Related Topics
This API enables you to log into the OpenSocial server with your Cisco Pulse username and password.
URL Template
http://hostname:7090/social/rest/sessionauth/username/password
HTTP Method
GET
Example
http://myhost1:7090/social/rest/sessionauth/george@mycompany.com/helloworld?format=xml
Data Structure
Not applicable
Parameters
|
|
|
|
---|---|---|---|
password |
Specifies your Cisco Pulse password. |
password |
Required |
Expected Results
•Success:
–If you are implementing a gadget on the Cisco Pulse platform, a unique session ID is returned.
•Failures:
–HTTP error 401: User does not have privileges.
–HTTP error 401: User Authentication Failed. Check Password
XML Format Example
<response> <java.lang.String>92e75c55-d648-46a3-8c11-a7a66f77d955</java.lang.String> </response>