Click or drag to resize

ServiceRouterGetSSOLink Method

Returns a GetSSOLinkOut result model.

Namespace: AppOne.Services.V2
Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax
public GetSSOLinkOut GetSSOLink(
	GetSSOLinkIn input
)

Parameters

input  GetSSOLinkIn
A new GetSSOLinkIn object

Return Value

GetSSOLinkOut
Returns a URL that will sign-in the specified user
Exceptions
ExceptionCondition
ServiceExceptionInvalid credentials in payload
Remarks
Returns a GetSSOLinkOut result model that allow a user to single sign-on to the time web services system.

Note  Note
The URL that is returned will automatically direct the user to a specific location within the time-web application. If the credentials used for the SSO operation were a time-web manager then the user will be directed at the manager dashboard. If it was an employee then they will see the employee dashboard. For a complete rundown on SSO please see the WSAccessControl Class
Caution note  Caution
The URL that is returned from this request is only valid for 2 minutes. The URL will make an authentication validation request then it will perform another redirection to a valid login session.
Example
JSON Request
{
    "Action":"SELECT-EMPID",
    "CustomerAlias":"apacheschemas",
    "EmpIdentifier":"1234",
    "LoginID":"",
    "LoginPass":"",
    "SSOSharedKey":"a4471428-a76a-4c70-b31c-4cf2f248c5z7"
}
JSON Response
{
    "Report": {
        "ProcessTime": "0.1958596",
        "RequestTime": "/Date(1440718137539-0700)/",
        "ResponseTime": "/Date(1440718137735-0700)/",
        "Results": 1
    },
    "Results": {
        "MobileURL": "https://brand.cs.com:443/Mobile/Account/LoginSSO?guid=e1e5a04d-7b74-40a1-8c4b-e730be39cad0&ca=apacheschema&e=1234",
        "WebURL": "https://brand.cs.com:443/LoginSSO.aspx?guid=e1e5a04d-7b74-40a1-8c4b-e730be39cad0&ca=apacheschema&e=1234"
    }
}
SOAP: C# WCF Sample
// ==================================
//TEST 1: SELECT-LOGIN-FULL
int countTest_1 = 0;
SoapServiceV2.GetSSOLinkRequest request1 = new SoapServiceV2.GetSSOLinkRequest();
request1.input = new SoapServiceV2.GetSSOLinkIn
{
    Action = "SELECT-LOGIN-FULL",
    LoginID = "rp",
    LoginPass = "rp"
};
SoapServiceV2.GetSSOLinkResponse response1 = client.GetSSOLink(request1);
countTest_1 = fnIsValidSSOUrl(response1.GetSSOLinkResult.Results.URL) ? 1 : 0;

// ==================================
//TEST 2: SELECT-LOGIN-ID
int countTest_2 = 0;
SoapServiceV2.GetSSOLinkRequest request2 = new SoapServiceV2.GetSSOLinkRequest();
request2.input = new SoapServiceV2.GetSSOLinkIn
{
    Action = "SELECT-LOGIN-ID",
    LoginID = "rp"
};
SoapServiceV2.GetSSOLinkResponse response2 = client.GetSSOLink(request2);
countTest_2 = fnIsValidSSOUrl(response2.GetSSOLinkResult.Results.URL) ? 1 : 0;
// ==================================
//TEST 3: SELECT-EMPID
int countTest_3 = 0;
SoapServiceV2.GetSSOLinkRequest request3 = new SoapServiceV2.GetSSOLinkRequest();
request3.input = new SoapServiceV2.GetSSOLinkIn
{
    Action = "SELECT-EMPID",
    EmpIdentifier = "82"
};
SoapServiceV2.GetSSOLinkResponse response3 = client.GetSSOLink(request3);
countTest_3 = fnIsValidSSOUrl(response3.GetSSOLinkResult.Results.URL) ? 1 : 0;

Assert.IsTrue(countTest_2 > 0 && countTest_1 > 0 && countTest_3 > 0);
See Also