Class SingleSignOnService
The single sign on implementation.
Inheritance
Implements
Inherited Members
Namespace: Mediachase.Commerce.Security
Assembly: Mediachase.Commerce.dll
Version: 10.8.0Syntax
public class SingleSignOnService : ISingleSignOn
Constructors
SingleSignOnService()
Declaration
public SingleSignOnService()
Fields
SsoRequestName
Query string request name for the SSO ticket.
Declaration
public const string SsoRequestName = "SSO"
Field Value
Type | Description |
---|---|
System.String |
SsoUserName
Query string request name for the SSO username.
Declaration
public const string SsoUserName = "SSOUser"
Field Value
Type | Description |
---|---|
System.String |
Properties
Current
Declaration
public static SingleSignOnService Current { get; }
Property Value
Type | Description |
---|---|
SingleSignOnService |
Methods
EncryptTicket(String, String)
Combines and hashes an unencrypted ticket and a shared secret into an encrypted ticket.
Declaration
public string EncryptTicket(string ticket, string sharedSecret)
Parameters
Type | Name | Description |
---|---|---|
System.String | ticket | The unencrypted ticket. |
System.String | sharedSecret | The shared secret. |
Returns
Type | Description |
---|---|
System.String |
GetTicket(String, String)
Generates an SSO ticket for the requested username and application.
Declaration
public string GetTicket(string userName, string applicationName)
Parameters
Type | Name | Description |
---|---|---|
System.String | userName | The username to associate with the ticket. |
System.String | applicationName | The application name to associate with the ticket. This may be null. |
Returns
Type | Description |
---|---|
System.String | The ticket value, or null if single sign on is disabled or a ticket cannot be created. |
ValidateTicket(String, String, out String)
Validates a single sign on ticket.
Declaration
public bool ValidateTicket(string encryptedTicket, string userName, out string applicationName)
Parameters
Type | Name | Description |
---|---|---|
System.String | encryptedTicket | |
System.String | userName | |
System.String | applicationName |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
ValidateTicket with default value of false for isSecureConnection.
ValidateTicket(String, String, out String, Boolean)
Checks a single sign on ticket.
Declaration
public bool ValidateTicket(string encryptedTicket, string userName, out string applicationName, bool isSecureConnection)
Parameters
Type | Name | Description |
---|---|---|
System.String | encryptedTicket | The encrypted ticket value. |
System.String | userName | The user (expected to match the ticket). |
System.String | applicationName | Name of the application. |
System.Boolean | isSecureConnection | if set to |
Returns
Type | Description |
---|---|
System.Boolean | Returns true and sets applicationName to the associated application name if the ticket is valid; otherwise, returns false and sets applicationName to null. |