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 ShowRegisterVoiceIDView ( string callerId, ShowCallback callback )
Runs the SSO application and shows the Register Voice ID page. More...
int ShowCreateAccountView ( string callerId, ShowCallback callback )
Runs the SSO application and shows the Create Account page. More...

Public Functions

delegate void AddCpAccountMappingInfoCallback ( IntPtr userData, int result )
Invoked when AddCpAccountMappingInfo is called successfully. More...
delegate void RemoveCpAccountMappingInfoCallback ( IntPtr userData, int result )
Invoked when RemoveCpAccountMappingInfo is called successfully. More...

Public Types

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

   Type for the current user's log on state.

Privilege

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

Privilege Level

partner

Version

4.4.0

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

   Type for API success and failure values.

Privilege

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

Privilege Level

partner

Version

4.4.0

Public Attributes

const string TermsOntvTnc

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

Privilege

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

Privilege Level

partner

Version

4.4.0

const string TermsOntvPn

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

Privilege

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

Privilege Level

partner

Version

4.4.0

const string TermsGame

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

Privilege

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

Privilege Level

partner

Version

4.4.0

const string TermsTvplus

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

Privilege

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

Privilege Level

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 to which the data is assigned.

Exceptions

InvalidOperationException
   Thrown if interop API returns null.
PlatformNotSupportedException
   Thrown when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

platform

Version

4.4.0

int GetLoginStatus()

   Gets whether a user is logged in.

Exceptions

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

Returns

A boolean value. Returns true if a user is logged in.

Privilege

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

Privilege Level

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 when the API is called on the emulator.

Returns

The currently logged-in user's GUID string.

Privilege

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

Privilege Level

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 when the API is called on the emulator.

Returns

The currently logged-in user's UID.

Privilege

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

Privilege Level

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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

partner

Version

4.4.0

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

   Requests a password reset for the active account.

Parameters

email
   The email address, if needed.
callback
   The callback to invoke when a response is received form 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

platform

Version

4.4.0

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

   Requests password verification for the active account.

Parameters

password
   The password, if needed.
callback
   The callback to invoke when a reponse is received 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

platform

Version

4.4.0

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

   Requests to switch accounts.

Parameters

account_id
   The account ID to switch to, such as "asdbc@add.com".
callback
   The callback to invoke when a reponse is received from the server.
userData
   The object returned through the callback.
password
   The password, if needed.

Exceptions

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

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

platform

Version

4.4.0

int RequestAccountList(RequestAccountListCallback callback, IntPtr userData)

   Requests the list of accounts on the device.

Parameters

callback
   The callback to invoke when a reponse is received 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

platform

Version

4.4.0

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

   Requests a device authentication code from the SSO server.

Parameters

appId
   The application ID calling this API.
callback
   The callback to invoke when a reponse is received 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

platform

Version

4.4.0

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

   Reqeusts a user authentication code from SSO server.

Parameters

appId
   The application ID calling this API.
callback
   The callback to invoke when a reponse is received 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

platform

Version

4.4.0

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

   Reqeusts a user authentication code from Samsung Account Server.

Parameters

appId
   The application ID calling this API.
callback
   The callback to invoke when a reponse is received 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

platform

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 when the API is called on the emulator.

Returns

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

Privilege

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

Privilege Level

platform

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 when the API is called on the emulator.

Returns

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

Privilege

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

Privilege Level

platform

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 to invoke when a reponse is received 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

partner

Version

4.4.0

int AddCpAccountMappingInfo(string appId, string cpName, string uid, AddCpAccountMappingInfoCallback 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 to invoke when a reponse is received 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

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 to invoke when a reponse is received 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

platform

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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

partner

Version

4.4.0

int ShowRegisterVoiceIDView(string callerId, ShowCallback callback)

   Runs the SSO application and shows the Register Voice ID 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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

partner

Version

5.5.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 when the API is called on the emulator.

Returns

0 on success and -1 on fail.

Privilege

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

Privilege Level

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
   0 if the SSO application runs successfully.
state
   The popup state (not ready, off, or on).

Privilege

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

Privilege Level

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
   0 if the SSO application runs successfully.
token
   The access token used when loggin in through another device.

Privilege

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

Privilege Level

partner

Version

4.4.0

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

   Invoked when GetCpAccountMappingList is called successfully.

Parameters

userData
   The object returned through the callback.
result
   0 if the SSO application runs successfully.
accountInfo
   The stringfied JSON.

Privilege

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

Privilege Level

partner

Version

4.4.0

delegate void AddCpAccountMappingInfoCallback(IntPtr userData, int result)

   Invoked when AddCpAccountMappingInfo is called successfully.

Parameters

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

Privilege

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

Privilege Level

partner

Version

4.4.0

delegate void RemoveCpAccountMappingInfoCallback(IntPtr userData, int result)

   Invoked when RemoveCpAccountMappingInfo is called successfully.

Parameters

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

Privilege

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

Privilege Level

partner

Version

4.4.0

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

   Invoked when RequestDeviceAuthcode is called successfully.

Parameters

userData
   The object returned through the callback.
result
   0 if the SSO application runs successfully.
responseData
   The device authcode.

Privilege

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

Privilege Level

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
   0 if the SSO application runs successfully
responseData
   The user authcode.

Privilege

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

Privilege Level

partner

Version

4.4.0

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

   Invoked when RequestResetPassword is called successfully.

Parameters

userData
   The object returned through the callback.
result
   0 if the SSO application runs successfully.
responseData
   Result of ResetPassword

Privilege

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

Privilege Level

partner

Version

4.4.0

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

   Invoked when RequestVerifyPassword is called successfully.

Parameters

userData
   The object returned through the callback.
result
   0 if the SSO application runs successfully.
responseData
   Result of VerifyPassword

Privilege

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

Privilege Level

partner

Version

4.4.0

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

   Invoked when RequestAccountSwitch is called successfully.

Parameters

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

Privilege

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

Privilege Level

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
   0 if the SSO application runs successfully, otherwise -1.
responseData
   Th Result of account List

Privilege

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

Privilege Level

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
   0 if the SSO application runs successfully.
responseData
   The user authcode.

Privilege

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

Privilege Level

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
   Always return 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

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

Privilege Level

partner

Version

4.4.0