top

'Tizen::TV::Service::Sso::Sso' class Reference

Public Types

LoginState
Type for the current user's log on state. More...
Result
Type for API success and failure values. More...

Public Attributes

const string TermsOntvTnc
A terms and conditions (TnC) document for Samsung Account. More...
const string TermsOntvPn
A terms and conditions (TnC) document for Private Policy. More...
const string TermsGame
The terms and conditions (TnC) document for the game service. More...
const string TermsTvplus
The terms and conditions (TnC) document for the TV Plus service. More...

Public Static Functions

int GetLoginInfo ( out LoginInfo info )
Get information about the currently logged-in user. More...
int GetLoginStatus ( )
Gets whether a user is logged in. More...
string GetGuid ( )
Gets the currently logged-in user's GUID. More...
string GetLoginUid ( )
Gets the currently logged-in user's UID. More...
int ShowAccountView ( string callerId, ShowCallback callback )
Runs the SSO application and shows the login page. More...
int UnsubscribeLoginState ( )
Unsubscribes from the user's logged on or off state. More...
int ShowAccountTncView ( string callerId, ShowCallback callback )
Runs the SSO application and shows the account terms and condition page. More...
int ShowCreateAccountView ( string callerId, ShowCallback callback )
Runs the SSO application and shows the Create Account page. More...

Public Functions

delegate void AddCpAccountMapingInfoCallback ( IntPtr userData, int result )
Invoked when AddCpAccountMappingList is called successfully. More...
delegate void RemoveCpAccountMappingInfoCallback ( IntPtr userData, int result )
Invoked when RemoveCpAccountMappingList is called successfully. More...

Public Types

LoginState
Enumerator
OffThe user is logged off.The user is logged off.
OnThe user is logged on. The user is logged on.

   Type for the current user's log on state.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

Result
Enumerator
SuccessThe API was called successfully.The API was called successfully.
FailThe API was not called successfully.The API was not called successfully.

   Type for API success and failure values.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

Public Attributes

const string TermsOntvTnc

   A terms and conditions (TnC) document for Samsung Account.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

const string TermsOntvPn

   A terms and conditions (TnC) document for Private Policy.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

const string TermsGame

   The terms and conditions (TnC) document for the game service.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

const string TermsTvplus

   The terms and conditions (TnC) document for the TV Plus service.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

Public Static Functions

int GetLoginInfo(out LoginInfo info)

   Get information about the currently logged-in user.

Parameters

info
   The struct is assigned the data

Exceptions

InvalidOperationException
   Thrown when interop's api return null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

The result is 0(success) or -1(fail)

Version

4.4.0

int GetLoginStatus()

   Gets whether a user is logged in.

Exceptions

InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Returns

True if a user is logged in, otherwise false.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

string GetGuid()

   Gets the currently logged-in user's GUID.

Exceptions

InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Returns

The currently logged-in user's GUID string.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

string GetLoginUid()

   Gets the currently logged-in user's UID.

Exceptions

InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Returns

The currently logged-in user's UID.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

int ShowAccountView(string callerId, ShowCallback callback)

   Runs the SSO application and shows the login page.

Parameters

callerId
   The application ID calling this API.
callback
   The callback to invoke if the SSO application is run successfully.

Exceptions

InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Returns

0 on success and -1 on fail.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

int RequestResetPassword(string email, RequestResetPasswordCallback callback, IntPtr userData)

   Request Reset Password of active account

Parameters

email
   In case of need to input password passing value on this parameter.
callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.

Exceptions

ArgumentNullException
   Thrown if appId, callback, or userData is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail.

Version

4.4.0

int RequestVerifyPassword(string password, RequestVerifyPasswordCallback callback, IntPtr userData)

   Request Verify Password of active account

Parameters

password
   In case of need to input password passing value on this parameter.
callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.

Exceptions

ArgumentNullException
   Thrown if appId, callback, or userData is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail.

Version

4.4.0

int RequestAccountSwitch(string account_id, RequestAccountSwitchCallback callback, IntPtr userData, string password)

   Request Account switch.

Parameters

account_id
   The id to switch "ex. asdbc@add.com"
callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.
password
   In case of need to input password passing value on this parameter.

Exceptions

ArgumentNullException
   Thrown if appId, callback, or userData is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail.

Version

4.4.0

int RequestAccountList(RequestAccountListCallback callback, IntPtr userData)

   Request Account list on TV.

Parameters

callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.

Exceptions

ArgumentNullException
   Thrown if appId, callback, or userData is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail.

Version

4.4.0

int RequestDeviceAuthcode(string appId, string scope, RequestDeviceAuthcodeCallback callback, IntPtr userData)

   Request device auth code with device information from SSO server.

Parameters

appId
   The application ID calling this API.
callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.
scope
   The delimeter is used to confirm request.

Exceptions

ArgumentNullException
   Thrown if appId, callback, or userData is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail.

Version

4.4.0

int RequestUserAuthcode(string appId, string scope, RequestUserAuthcodeCallback callback, IntPtr userData)

   Reqeust user authcode with login account from SSO server.

Parameters

appId
   The application ID calling this API.
callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.
scope
   The delimeter is used to confirm request.

Exceptions

ArgumentNullException
   Thrown if appId, callback, or userData is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail.

Version

4.4.0

int RequestAuthcode(string appId, string scope, RequestAuthcodeCallback callback, IntPtr userData)

   Reqeust user authcode from Samsung Account Server.

Parameters

appId
   The application ID calling this API.
callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.
scope
   The delimeter is used to confirm request.

Exceptions

ArgumentNullException
   Thrown if appId, callback, or userData is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail.

Version

4.4.0

int UnsubscribeLoginState()

   Unsubscribes from the user's logged on or off state.

Exceptions

InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail (if the subscribed callback does not exist).

Version

4.4.0

int SubscribeLoginState(SubscribeLoginStateCallback callback, IntPtr userData)

   Subscribes to the user's logged on or off state.

Parameters

callback
   This callback is invoked, when user log on or off.
userData
   The object returned through the callback.

Exceptions

InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail (if subscribed more than once).

Version

4.4.0

int RemoveCpAccountMappingInfo(string appId, string cpName, string uid, RemoveCpAccountMappingInfoCallback callback, IntPtr userData)

   Removes a service from the server.

Parameters

appId
   The application ID calling this API.
cpName
   The service name
uid
   The logged-in user's UID.
callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.

Exceptions

ArgumentNullException
   Thrown if appId, secretKey, or uid is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Returns

0 on success and -1 on fail.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

int AddCpAccountMappingInfo(string appId, string cpName, string uid, AddCpAccountMapingInfoCallback callback, IntPtr userData)

   Registers a new service to the server.

Parameters

appId
   The application ID calling this API.
cpName
   The service name.
uid
   The logged-in user's UID.
callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.

Exceptions

ArgumentNullException
   Thrown if appId, secretKey, or uid is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Returns

0 on success and -1 on fail.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

int GetCpAccountMappingList(string appId, string cpName, GetCpAccountMappingListCallback callback, IntPtr userData)

   Gets the user's subscribed service list.

Parameters

appId
   The application ID calling this API.
cpName
   The service name.
callback
   The callback is invoked with list, when receive response from the server.
userData
   The object returned through the callback.

Exceptions

ArgumentNullException
   Thrown if appId or secretKey is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Returns

0 on success and -1 on fail.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

int RequestAccessToken(string appId, string secretKey, RequestAccessTokenCallback callback, IntPtr userData)

   Gets the access token based on the application ID and secret key.

Parameters

appId
   The string which request this api.
secretKey
   The string pair with application.
callback
   The callback is invoked, when receive response from the server.
userData
   The object returned through the callback.

Exceptions

ArgumentNullException
   Thrown if appId or secretKey is null.
InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Privilege Level

platform

Privilege

http://developer.samsung.com/privilege/sso.platform

Returns

0 on success and -1 on fail.

Version

4.4.0

int ShowAccountTncView(string callerId, ShowCallback callback)

   Runs the SSO application and shows the account terms and condition page.

Parameters

callerId
   The application ID calling this API.
callback
   The callback to invoke if the SSO application is run successfully.

Exceptions

InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Returns

0 on success and -1 on fail.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

int ShowCreateAccountView(string callerId, ShowCallback callback)

   Runs the SSO application and shows the Create Account page.

Parameters

callerId
   The application ID calling this API.
callback
   The callback to invoke if the SSO application is run successfully.

Exceptions

InvalidOperationException
   Thrown if the Interop API returns null.
PlatformNotSupportedException
   Thrown if the API is called on Emulator.

Returns

0 on success and -1 on fail.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

Public Functions

delegate void ShowCallback(IntPtr userData, int result, int state)

   Invoked when ShowSso is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
state
   The popup state (not ready, off, or on).

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void RequestAccessTokenCallback(IntPtr userData, int result, string token)

   Invoked when RequestAccessToken is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
token
   The access token used when loggin in through another device.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void GetCpAccountMappingListCallback(IntPtr userData, int result, string tccountInfo)

   Invoked when GetCpAccountMappingList is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
tccountInfo
   The stringfied JSON.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void AddCpAccountMapingInfoCallback(IntPtr userData, int result)

   Invoked when AddCpAccountMappingList is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void RemoveCpAccountMappingInfoCallback(IntPtr userData, int result)

   Invoked when RemoveCpAccountMappingList is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void RequestDeviceAuthcodeCallback(IntPtr userData, int result, string responseData)

   Invoked when RequestUserAuthcode is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
responseData
   The user authcode.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void RequestUserAuthcodeCallback(IntPtr userData, int result, string responseData)

   Invoked when RequestUserAuthcode is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
responseData
   The user authcode.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void RequestResetPasswordCallback(IntPtr userData, int result, string responseData)

   Invoked when RequestResetPasswordCallback is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
responseData
   Result of SwitchAccount

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void RequestVerifyPasswordCallback(IntPtr userData, int result, string responseData)

   Invoked when RequestVerifyPasswordCallback is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
responseData
   Result of SwitchAccount

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void RequestAccountSwitchCallback(IntPtr userData, int result, string responseData)

   Invoked when RequestAccountSwitchCallback is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
responseData
   Result of SwitchAccount

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void RequestAccountListCallback(IntPtr userData, int result, string responseData)

   Invoked when RequestAccountList is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
responseData
   Th Result of account List

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void RequestAuthcodeCallback(IntPtr userData, int result, string responseData)

   Invoked when RequestAuthcode is called successfully.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
responseData
   The user authcode.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0

delegate void SubscribeLoginStateCallback(IntPtr userData, int result, LoginState state, string account, string userIcon)

   If subscribed, invoked when the user logs on or off.

Parameters

userData
   The object returned through the callback.
result
   1 if the SSO application runs successfully, otherwise 0.
state
   If the user has logged on, receive 'LoginState.On '. Otherwise, receive 'LoginState.Off '.
account
   The user account string.
userIcon
   The user icon path.

Privilege Level

partner

Privilege

http://developer.samsung.com/privilege/sso.partner

Version

4.4.0