Usage: REST API and Client SDK libraries. REST APIs via POST actions only.
Usage by:
Enterprise Admin
Domain Admin
Pro
Analyst
Viewer
Basic
Method Signature
Input Parameters
Name
userOpenIdCredentials
Object Type
UserOpenIdCredentials
Description
The user credentials for authentication by OpenID parameter map.
Output Response
Successful Result Code
200
Response Type
string
Description of Response Type
The response is the security token as a base64 string. It is usually stored in a cookie.
Notes
The security token is a string that needs to be added to a cookie on the third party host page for any embedded content to ensure the access is authorized. The assumption is that the user has already authenticated via OPENID in the hosting application before attempting to authenticate into Pyramid.
Examples
Authenticate User for Embedding with OpenID:
This example demonstrates how to authenticate a user for embedding using OpenID.
// URL of the Pyramid installation and the path to the API 3.0 REST methods
var pyramidURL = "http://mysite.com/api3/";
// Domain of the Pyramid installation
var domainName = “YOUR_DOMAIN”
// The response from the OpenId authentication
var openIdToken = “YOUR_OPEN_ID_TOKEN(RESPONSE)”;
importcom.pyramidanalytics.*;importcom.pyramidanalytics.auth.*;importcom.pyramidanalytics.model.*;importcom.pyramidanalytics.api.AuthenticationServiceApi;importjava.util.*;importjava.time.*;publicclassAuthenticationServiceApiExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=Configuration.getDefaultApiClient();defaultClient.setBasePath("http://Your.Server.URL/");// Create an instance of the API classAuthenticationServiceApiapiInstance=newAuthenticationServiceApi();// Initialize the userOpenIdCredentials parameter object for the callUserOpenIdCredentialsuserOpenIdCredentials=;// Create the input object for the operation, type: UserOpenIdCredentials try{Stringresult=apiInstance.authenticateUserEmbedOPENID(userOpenIdCredentials);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AuthenticationServiceApi#authenticateUserEmbedOPENID");e.printStackTrace();}}}
import*asPyramidAnalyticsWebApifrom"com.pyramidanalytics";// Create an instance of the API class
constapi=newPyramidAnalyticsWebApi.AuthenticationServiceApi("http://Your.Server.URL")constuserOpenIdCredentials=;// {UserOpenIdCredentials}
api.authenticateUserEmbedOPENID(userOpenIdCredentials).then(function(data){console.log('API called successfully. Returned data: '+data);},function(error){console.error(error);});
using System;
using System.Diagnostics;
using PyramidAnalytics.Sdk.Api;
using PyramidAnalytics.Sdk.Client;
using PyramidAnalytics.Sdk.Model;
public class authenticateUserEmbedOPENIDExample
{
public static void Main()
{
Configuration conf = new Configuration();
conf.BasePath = "http://Your.Server.URL/";
GlobalConfiguration.Instance = conf;
// Create an instance of the API class
var apiInstance = new AuthenticationServiceApi();
// Initialize the userOpenIdCredentials parameter object for the call
var userOpenIdCredentials = new UserOpenIdCredentials(); // UserOpenIdCredentials |
try {
// Generates a Pyramid access authentication token for embedding using OpenID parameter map
string result = apiInstance.authenticateUserEmbedOPENID(userOpenIdCredentials);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling AuthenticationServiceApi.authenticateUserEmbedOPENID: " + e.Message );
}
}
}
importcom.pyramidanalyticsfromcom.pyramidanalyticsimportApiExceptionfromcom.pyramidanalyticsimportAuthenticationServiceApifrompprintimportpprintapi_config=com.pyramidanalytics.Configuration(host='http://Your.Server.URL')withcom.pyramidanalytics.ApiClient(api_config)asapi_client:# Create an instance of the API classapi_instance=AuthenticationServiceApi(api_client)# Initialize the userOpenIdCredentials parameter object for the calluserOpenIdCredentials=# UserOpenIdCredentials | try:# Generates a Pyramid access authentication token for embedding using OpenID parameter mapapi_response=api_instance.authenticate_user_embed_openid(userOpenIdCredentials)pprint(api_response)exceptApiExceptionase:print("Exception when calling AuthenticationServiceApi->authenticateUserEmbedOPENID: %s\n"%e)
<?phprequire_once(__DIR__.'/vendor/autoload.php');OpenAPITools\Client\Configuration::getDefaultConfiguration()->setHost('http://Your.Server.URL');// Create an instance of the API class
$api_instance=newOpenAPITools\Client\Api\AuthenticationServiceApi();$userOpenIdCredentials=;// UserOpenIdCredentials |
try{$result=$api_instance->authenticateUserEmbedOPENID($userOpenIdCredentials);print_r($result);}catch(Exception$e){echo'Exception when calling AuthenticationServiceApi->authenticateUserEmbedOPENID: ',$e->getMessage(),PHP_EOL;}?>