SessionManagerOpenSession Method (ConnectionId, String, Object) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Opens a session by using a custom authentication provider.

Namespace: ContentStudio.Security
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public int OpenSession(
	ConnectionId connectionId,
	string providerName,
	Object token
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
providerName
Type: SystemString
The registered name of a custom provider implementation. If providerName is null (Nothing in Visual Basic) or Empty the ordinary Windows authentication is used.
token
Type: SystemObject
A token retrieved from a custom login mechanism. The token is passed on to the custom authentication provider as proof of a successful login. The format of this token is determined entirely by the custom authentication provider. If token is null (Nothing in Visual Basic) the ordinary Windows authentication is used.

Return Value

Type: Int32
An identifier to the caller's Content Studio session
Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe provider represented by the name providerName could not be found or record is empty.
TypeLoadExceptionThe Type represented by the name %ProviderName% could not be loaded.
FileNotFoundExceptionThe specified assembly file could not be found. The Content Studio service could not locate the compiled custom provider or there is an error in the registered custom provider assembly path.
DirectoryNotFoundExceptionThe AuthProviders registry key is missing.
InvalidCastExceptionThe specified provider does not inherit from the AuthenticationBase class.
CSCustomAuthenticationFailedException The authentication failed because the user's token could not be matched. The custom authentication provider throws this exception when it expects the user to provide her login credentials again and login again to get a valid token.
CSCustomAuthenticationTokenException The passed in token is in a format that is invalid in the custom authentication system. This exception is thrown by the custom authentication provider and indicates that a fake token is passed in or that the wrong custom system is used.
ExceptionAny exception from the custom provider are thrown as is.
Remarks

On a Content Studio Web site a user's session identifier, is always available in the CS_UserSessionId property. For this reason there is no meaning to open a session using this method from within a Content Studio Web page.
See Also

Reference