SnCore!

WebAccountService Class Reference

Managed web account services. More...

List of all members.


Public Member Functions

string Login (string email, string password)
 Login.
string LoginOpenId (string token, string[] names, string[] values)
 Login to an account with an OpenId.
TransitOpenIdLogin TryLoginOpenId (string token, string[] names, string[] values)
 Try a login to an account with an OpenId. Returns a package that may contain a ticket or a verified open id consumer uri.
string LoginMd5 (string emailaddress, byte[] passwordhash)
 Login to an account using a verified e-mail address and a password hash. Using the password hash avoids transferring the actual password accross an unsecure network.
void VerifyBetaPassword (string betapassword)
 Verify beta password.
bool IsBetaPasswordSet ()
 Check whether a beta password is set.
int CreateAccount (string betapassword, string emailaddress, TransitAccount ta)
 Create an account.
int CreateAccountWithOpenId (string betapassword, string consumerurl, string email, TransitAccount ta)
 Create an account with openid.
TransitOpenIdRedirect GetOpenIdRedirect (string openidurl, string returnurl)
 Get an OpenId redirect.
string VerifyOpenId (string token, string[] names, string[] values)
 Verify an OpenId.
int GetAccountsCount (string ticket)
 Get accounts count.
List< TransitAccount > GetAccounts (string ticket, ServiceQueryOptions options)
 Get accounts.
int GetAccountId (string ticket)
 Get account id.
TransitAccount GetAccount (string ticket, bool updatelastlogin)
 Get logged in account information. Also updates last login time on five minute intervals.
TransitAccount GetAdminAccount (string ticket)
 Get an administrative account.
TransitAccount GetAccountById (string ticket, int id)
 Get account information.
int CreateOrUpdateAccount (string ticket, TransitAccount t_instance)
 Create or update an account.
void DeleteAccount (string ticket, int id)
 Delete an account.
TransitAccount FindByEmail (string ticket, string emailaddress)
 Find an account by e-mail address.
List< TransitAccount > FindAllByEmail (string ticket, string emailaddress, ServiceQueryOptions options)
 Find all accounts by e-mail address.
string CreateAccountWithInvitationAndLogin (int invitationid, string code, TransitAccount ta)
 Create an account with an e-mail invitation and login.
int CreateAccountWithInvitation (int invitationid, string code, TransitAccount ta)
 Create an account with an e-mail invitation.
void DeclineInvitation (int id, string code)
 Decline an invitation to the system.
TransitAccountInvitation GetAccountInvitationByEmail (string ticket, int id, string email)
 Invite a person.
int CreateOrUpdateAccountInvitation (string ticket, TransitAccountInvitation invitation)
 Invite a person.
List< TransitAccountInvitation > GetAccountInvitationsByAccountId (string ticket, int id, ServiceQueryOptions options)
 Get account invitations.
int GetAccountInvitationsCountByAccountId (string ticket, int id)
 Get account invitations count by id.
List< TransitAccountInvitation > GetAccountInvitations (string ticket, ServiceQueryOptions options)
 Get all account invitations.
int GetAccountInvitationsCount (string ticket)
 Get all account invitations count.
TransitAccountInvitation GetAccountInvitationById (string ticket, int id)
 Get account invitation by id.
TransitAccountInvitation GetAccountInvitationByIdAndCode (string ticket, int id, string code)
 Get account invitation by id and code.
void DeleteAccountInvitation (string ticket, int id)
 Delete an invitation.
void PromoteAdministrator (string ticket, int id)
 Promote a user to an administrator.
void DemoteAdministrator (string ticket, int id)
 Demote a user to from an administrator.
string Impersonate (string ticket, int id)
 Impersonate an account (a user).
void ChangePassword (string ticket, int accountid, string oldpassword, string newpassword)
 Change password.
void ChangePasswordMd5 (string ticket, int accountid, string oldpasswordhash, string newpassword)
 Change password.
bool IsPasswordValid (string ticket, int accountid, string password)
 Check password.
bool IsPasswordValidMd5 (string ticket, int accountid, string password)
 Check password with an Md5 hash.
void ResetPassword (string emailaddress, DateTime dateofbirth)
 Reset password.
int CreateOrUpdateAccountEmail (string ticket, TransitAccountEmail tae)
 Create or update an account e-mail.
int GetAccountEmailsCount (string ticket, int id)
 Get account e-mails count.
List< TransitAccountEmail > GetAccountEmails (string ticket, int id, ServiceQueryOptions options)
 Get account e-mails.
TransitAccountEmail GetAccountEmailById (string ticket, int id)
 Get an account e-mail by id.
void DeleteAccountEmail (string ticket, int id)
 Delete an account e-mail.
string VerifyAccountEmail (int id, string code)
 Verify an e-mail.
void ConfirmAccountEmail (string ticket, int id)
 Re-send a confirmation for an e-mail address.
bool HasVerifiedEmail (string ticket, int id)
 Check whether a user has a verified e-mail address.
string GetActiveEmailAddress (string ticket, int id)
 Return an active e-mail address.
int GetAccountEmailConfirmationsCount (string ticket, int id)
 Get account e-mail confirmations count.
List
< TransitAccountEmailConfirmation > 
GetAccountEmailConfirmations (string ticket, int id, ServiceQueryOptions options)
 Get account e-mail confirmations.
TransitAccountEmailConfirmation GetAccountEmailConfirmationById (string ticket, int id)
 Get an account e-mail confirmation by id.
void DeleteAccountEmailConfirmation (string ticket, int id)
 Delete an account e-mail confirmation.
List< TransitAccountOpenId > GetAccountOpenIds (string ticket, int id, ServiceQueryOptions options)
 Get account openids.
int GetAccountOpenIdsCount (string ticket, int id)
 Get the number of open ids associated with an account.
void DeleteAccountOpenId (string ticket, int id)
 Delete an openid.
int CreateOrUpdateAccountOpenId (string ticket, TransitAccountOpenId openid)
 Add an openid.
TransitAccountOpenId GetAccountOpenIdById (string ticket, int id)
 Get an account openid.
List< TransitAccountActivity > SearchAccounts (string ticket, string s, ServiceQueryOptions options)
 Search accounts.
int SearchAccountsCount (string ticket, string s)
 Return the number of accounts matching a query.
int CreateOrUpdateAccountPropertyGroup (string ticket, TransitAccountPropertyGroup pg)
 Create or update a property group.
TransitAccountPropertyGroup GetAccountPropertyGroupById (string ticket, int id)
 Get a property group.
int GetAccountPropertyGroupsCount (string ticket)
 Get all property groups count.
List< TransitAccountPropertyGroup > GetAccountPropertyGroups (string ticket, ServiceQueryOptions options)
 Get all property groups.
void DeleteAccountPropertyGroup (string ticket, int id)
 Delete a property group.
int CreateOrUpdateAccountProperty (string ticket, TransitAccountProperty t_instance)
 Create or update an account property.
TransitAccountProperty GetAccountPropertyById (string ticket, int id)
 Get an account property.
int GetAccountPropertiesCount (string ticket, int gid)
 Get all account properties count.
List< TransitAccountProperty > GetAccountProperties (string ticket, int gid, ServiceQueryOptions options)
 Get all account properties.
void DeleteAccountProperty (string ticket, int id)
 Delete an account property.
List< TransitAccount > GetAccountsByPropertyValue (string ticket, string groupname, string propertyname, string propertyvalue, ServiceQueryOptions options)
 Get accounts that match a property value by name.
int GetAccountsByPropertyValueCount (string ticket, string groupname, string propertyname, string propertyvalue)
 Get the number of accounts that match a property value by name.
TransitAccountPropertyValue GetAccountPropertyValueByName (string ticket, int accountid, string groupname, string propertyname)
 Get a account property value by name.
int CreateOrUpdateAccountPropertyValue (string ticket, TransitAccountPropertyValue propertyvalue)
 Create or update an account property value.
TransitAccountPropertyValue GetAccountPropertyValueById (string ticket, int id)
 Get an account property value.
List< TransitAccountPropertyValue > GetAccountPropertyValues (string ticket, int id, int groupid, ServiceQueryOptions options)
 Get account property values.
int GetAccountPropertyValuesCount (string ticket, int id, int groupid)
 Get account property values count.
List< TransitAccountPropertyValue > GetAllAccountPropertyValues (string ticket, int accountid, int groupid)
 Get all account property values, including unfilled ones.
void DeleteAccountPropertyValue (string ticket, int id)
 Delete an account property value.
int CreateOrUpdateAccountAttribute (string ticket, TransitAccountAttribute attribute)
 Create or update an account attribute.
TransitAccountAttribute GetAccountAttributeById (string ticket, int id)
 Get account attributes.
int GetAccountAttributesCount (string ticket, int id)
 Get account attributes count.
List< TransitAccountAttribute > GetAccountAttributes (string ticket, int id, ServiceQueryOptions options)
 Get account attributes.
void DeleteAccountAttribute (string ticket, int id)
 Delete an account attribute.
int GetAccountRedirectsCount (string ticket, int id)
 Get account redirects count by account id.
int GetAllAccountRedirectsCount (string ticket)
 Get all account redirects count.
List< TransitAccountRedirect > GetAccountRedirects (string ticket, int id, ServiceQueryOptions options)
 Get account redirects.
List< TransitAccountRedirect > GetAllAccountRedirects (string ticket, ServiceQueryOptions options)
 Get all account redirects.
TransitAccountRedirect GetAccountRedirectById (string ticket, int id)
 Get account redirect by id.
TransitAccountRedirect GetAccountRedirectBySourceUri (string ticket, int id, string uri)
 Get account redirect by source uri.
TransitAccountRedirect GetAccountRedirectByTargetUri (string ticket, int id, string uri)
 Get account redirect by target uri.
int CreateOrUpdateAccountRedirect (string ticket, TransitAccountRedirect redirect)
 Create or update a redirect.
void DeleteAccountRedirect (string ticket, int id)
 Delete a redirect.
int CreateOrUpdateAccountAddress (string ticket, TransitAccountAddress t_instance)
 Create or update an account address.
TransitAccountAddress GetAccountAddressById (string ticket, int id)
 Get an account address.
int GetAccountAddressesCount (string ticket, int id)
 Get all account addresses count.
List< TransitAccountAddress > GetAccountAddresses (string ticket, int id, ServiceQueryOptions options)
 Get all account addresses.
void DeleteAccountAddress (string ticket, int id)
 Delete an account address.
int CreateOrUpdateAccountWebsite (string ticket, TransitAccountWebsite t_instance)
 Create or update an account website.
TransitAccountWebsite GetAccountWebsiteById (string ticket, int id)
 Get an account website.
int GetAccountWebsitesCount (string ticket, int id)
 Get all account websites count.
List< TransitAccountWebsite > GetAccountWebsites (string ticket, int id, ServiceQueryOptions options)
 Get all account websites.
void DeleteAccountWebsite (string ticket, int id)
 Delete an account website.
int CreateOrUpdateAccountPicture (string ticket, TransitAccountPicture accountpicture)
 Create or update a account picture.
void MoveAccountPicture (string ticket, int id, int disp)
 Move an account picture.
TransitAccountPicture GetAccountPictureById (string ticket, int id)
 Get a account picture.
TransitAccountPicture GetAccountPictureIfModifiedSinceById (string ticket, int id, DateTime ifModifiedSince)
 Get account picture picture if modified since.
int GetAccountPicturesCount (string ticket, int id, AccountPicturesQueryOptions qopt)
 Get account pictures count.
List< TransitAccountPicture > GetAccountPictures (string ticket, int id, AccountPicturesQueryOptions qopt, ServiceQueryOptions options)
 Get all account pictures.
void DeleteAccountPicture (string ticket, int id)
 Delete a account picture.
int GetAccountSurveyAnswersCount (string ticket, int id, int surveyid)
 Get account survey answers count.
List< TransitAccountSurveyAnswer > GetAccountSurveyAnswers (string ticket, int id, int surveyid, ServiceQueryOptions options)
 Get account survey answers.
int GetAccountSurveyAnswersCountByQuestionId (string ticket, int id)
 Get survey answers count for a single question.
List< TransitAccountSurveyAnswer > GetAccountSurveyAnswersByQuestionId (string ticket, int id, ServiceQueryOptions options)
 Get survey answers for a single question.
TransitAccountSurveyAnswer GetAccountSurveyAnswerById (string ticket, int id)
 Get account survey answer by id.
int CreateOrUpdateAccountSurveyAnswer (string ticket, TransitAccountSurveyAnswer answer)
 Create or update a survey answer.
void DeleteAccountSurveyAnswer (string ticket, int id)
 Delete a survey answer.
List< TransitSurvey > GetAccountSurveysById (string ticket, int id, ServiceQueryOptions options)
 Get surveys answered by an account.
void CreateAccountSystemMessageFolders (string ticket, int id)
 Create account system folders.
List< TransitAccountMessageFolder > GetAccountMessageFolders (string ticket, int id, ServiceQueryOptions options)
 Get account message folders.
int GetAccountMessageFoldersCount (string ticket, int id)
 Get account message folders count.
TransitAccountMessageFolder GetAccountMessageFolderById (string ticket, int id)
 Get account message folder by id.
int CreateOrUpdateAccountMessageFolder (string ticket, TransitAccountMessageFolder messagefolder)
 Add a message folder.
void DeleteAccountMessageFolder (string ticket, int id)
 Delete a message folder.
TransitAccountMessageFolder GetAccountMessageSystemFolder (string ticket, int id, string folder)
 Get account message folder by id.
int GetAccountMessagesCount (string ticket, int folderid)
 Get account messages count.
List< TransitAccountMessage > GetAccountMessages (string ticket, int folderid, ServiceQueryOptions options)
 Get account messages.
TransitAccountMessage GetAccountMessageById (string ticket, int id)
 Get account message by id.
int CreateOrUpdateAccountMessage (string ticket, TransitAccountMessage message)
 Create or update a message.
void DeleteAccountMessage (string ticket, int id)
 Delete a message.
void DeleteAccountMessagesByFolder (string ticket, int id)
 Delete messages in a folder.
void MoveAccountMessageToFolderById (string ticket, int messageid, int folderid)
 Move a message.
void MoveAccountMessageToFolder (string ticket, int id, int messageid, string folder)
 Move a message.
int CreateOrUpdateAccountEmailMessage (string ticket, TransitAccountEmailMessage AccountEmailMessage)
 Create or update a AccountEmailMessage.
TransitAccountEmailMessage GetAccountEmailMessageById (string ticket, int id)
 Get a AccountEmailMessage.
List< TransitAccountEmailMessage > GetAccountEmailMessages (string ticket, ServiceQueryOptions options)
 Get all account e-mail messages.
int GetAccountEmailMessagesCount (string ticket)
 Get all account e-mail messages count.
void DeleteAccountEmailMessage (string ticket, int id)
 Delete an account e-mail message.
int CreateOrUpdateAccountFlagType (string ticket, TransitAccountFlagType flagtype)
 Create or update an flag type.
TransitAccountFlagType GetAccountFlagTypeById (string ticket, int id)
 Get an flag type.
List< TransitAccountFlagType > GetAccountFlagTypes (string ticket, ServiceQueryOptions options)
 Get all flag types.
int GetAccountFlagTypesCount (string ticket)
 Get all flag types count.
void DeleteAccountFlagType (string ticket, int id)
 Delete an flag type.
int CreateOrUpdateAccountFlag (string ticket, TransitAccountFlag flag)
 Flag an account.
TransitAccountFlag GetAccountFlagById (string ticket, int id)
 Get a flagged account.
List< TransitAccountFlag > GetAccountFlags (string ticket, ServiceQueryOptions options)
 Get all account flags.
int GetAccountFlagsCount (string ticket)
 Get all account flags count.
List< TransitAccountFlag > GetAccountFlagsByAccountId (string ticket, int id, ServiceQueryOptions options)
 Get all account flags by account id.
int GetAccountFlagsByAccountIdCount (string ticket, int id)
 Get all account flags count by account id.
List< TransitAccountFlag > GetAccountFlagsByFlaggedAccountId (string ticket, int id, ServiceQueryOptions options)
 Get all account flags by flagged account id.
int GetAccountFlagsByFlaggedAccountIdCount (string ticket, int id)
 Get all account flags count by flagged account id.
void DeleteAccountFlag (string ticket, int id)
 Delete a flag.
int CreateOrUpdateAccountQuota (string ticket, TransitAccountQuota quota)
 Set a quota for an account.
TransitAccountQuota GetAccountQuotaById (string ticket, int id)
 Get an account quota.
List< TransitAccountQuota > GetAccountQuotas (string ticket, int id, ServiceQueryOptions options)
 Get all account quotas by account id.
int GetAccountQuotasCount (string ticket, int id)
 Get all account quotas count by account id.
void DeleteAccountQuota (string ticket, int id)
 Delete a quota.
TransitAccountQuota GetAccountQuotaByObjectName (string ticket, int id, string name)
 Get account quota by object name and account id.
TransitAccountNumbers GetAccountNumbersByAccountId (string ticket, int id)
 Get account numbers.

Protected Member Functions

IList< AccountInternalSearchAccounts (ISession session, string s, ServiceQueryOptions options)

Detailed Description

Managed web account services.


Member Function Documentation

string Login ( string  email,
string  password 
)

Login.

Parameters:
email verified e-mail address
password valid password
Returns:
authentication ticket for the current session

string LoginOpenId ( string  token,
string[]  names,
string[]  values 
)

Login to an account with an OpenId.

Parameters:
openidurl openid url
returnurl return url
Returns:
authentication ticket for the current session

TransitOpenIdLogin TryLoginOpenId ( string  token,
string[]  names,
string[]  values 
)

Try a login to an account with an OpenId. Returns a package that may contain a ticket or a verified open id consumer uri.

Parameters:
openidurl openid url
returnurl return url
Returns:
authentication package that might contain a ticket for the current session

string LoginMd5 ( string  emailaddress,
byte[]  passwordhash 
)

Login to an account using a verified e-mail address and a password hash. Using the password hash avoids transferring the actual password accross an unsecure network.

Parameters:
emailaddress verified e-mail address
passwordhash valid password MD5 hash
Returns:
authentication ticket for the current session

void VerifyBetaPassword ( string  betapassword  ) 

Verify beta password.

Parameters:
password password

bool IsBetaPasswordSet (  ) 

Check whether a beta password is set.

int CreateAccount ( string  betapassword,
string  emailaddress,
TransitAccount  ta 
)

Create an account.

Parameters:
name user name
emailaddress e-mail address
ta transit account information
Returns:
account id

int CreateAccountWithOpenId ( string  betapassword,
string  consumerurl,
string  email,
TransitAccount  ta 
)

Create an account with openid.

Parameters:
ta transit account informatio
Returns:
account id

TransitOpenIdRedirect GetOpenIdRedirect ( string  openidurl,
string  returnurl 
)

Get an OpenId redirect.

Parameters:
openidurl openid url
returnurl return url
Returns:
authentication ticket for the current session

string VerifyOpenId ( string  token,
string[]  names,
string[]  values 
)

Verify an OpenId.

Parameters:
token 
c 
Returns:

int GetAccountsCount ( string  ticket  ) 

Get accounts count.

Returns:
accounts count

List<TransitAccount> GetAccounts ( string  ticket,
ServiceQueryOptions  options 
)

Get accounts.

Returns:
accounts count

int GetAccountId ( string  ticket  ) 

Get account id.

Parameters:
ticket authentication ticket previously obtained from SnCore::WebAccountService::Login or SnCore::WebAccountService::LoginMd5
Returns:
account id

TransitAccount GetAccount ( string  ticket,
bool  updatelastlogin 
)

Get logged in account information. Also updates last login time on five minute intervals.

Parameters:
ticket authentication ticket
Returns:
transit account

TransitAccount GetAdminAccount ( string  ticket  ) 

Get an administrative account.

Returns:
transit account

TransitAccount GetAccountById ( string  ticket,
int  id 
)

Get account information.

Parameters:
id account id
Returns:
transit account

int CreateOrUpdateAccount ( string  ticket,
TransitAccount  t_instance 
)

Create or update an account.

Parameters:
ticket authentication ticket
type transit account

void DeleteAccount ( string  ticket,
int  id 
)

Delete an account.

Parameters:
ticket authentication ticket
id account to delete

TransitAccount FindByEmail ( string  ticket,
string  emailaddress 
)

Find an account by e-mail address.

Parameters:
emailaddress verified e-mail address
Returns:
authentication ticket for the current session

List<TransitAccount> FindAllByEmail ( string  ticket,
string  emailaddress,
ServiceQueryOptions  options 
)

Find all accounts by e-mail address.

Parameters:
emailaddress e-mail address
Returns:
authentication ticket for the current session

string CreateAccountWithInvitationAndLogin ( int  invitationid,
string  code,
TransitAccount  ta 
)

Create an account with an e-mail invitation and login.

Parameters:
invitationid 
code 
ta 
Returns:

int CreateAccountWithInvitation ( int  invitationid,
string  code,
TransitAccount  ta 
)

Create an account with an e-mail invitation.

Parameters:
invitationid invitation id
code code
ta transit account information
Returns:
account id

void DeclineInvitation ( int  id,
string  code 
)

Decline an invitation to the system.

Parameters:
id invitation id
code invitation code

TransitAccountInvitation GetAccountInvitationByEmail ( string  ticket,
int  id,
string  email 
)

Invite a person.

Parameters:
ticket authentication ticket
invitation transit invitation

int CreateOrUpdateAccountInvitation ( string  ticket,
TransitAccountInvitation  invitation 
)

Invite a person.

Parameters:
ticket authentication ticket
invitation transit invitation

List<TransitAccountInvitation> GetAccountInvitationsByAccountId ( string  ticket,
int  id,
ServiceQueryOptions  options 
)

Get account invitations.

Parameters:
id account id
Returns:
transit account invitations

int GetAccountInvitationsCountByAccountId ( string  ticket,
int  id 
)

Get account invitations count by id.

Parameters:
id account id
Returns:
number of outstanding account invitations

List<TransitAccountInvitation> GetAccountInvitations ( string  ticket,
ServiceQueryOptions  options 
)

Get all account invitations.

Returns:
transit account invitations

int GetAccountInvitationsCount ( string  ticket  ) 

Get all account invitations count.

Returns:
number of outstanding account invitations

TransitAccountInvitation GetAccountInvitationById ( string  ticket,
int  id 
)

Get account invitation by id.

Parameters:
ticket authentication ticket
id invitation id
Returns:
transit account invitation

TransitAccountInvitation GetAccountInvitationByIdAndCode ( string  ticket,
int  id,
string  code 
)

Get account invitation by id and code.

Parameters:
ticket authentication ticket
id invitation id
Returns:
transit account invitation

void DeleteAccountInvitation ( string  ticket,
int  id 
)

Delete an invitation.

Parameters:
ticket authentication ticket
id invitation id

void PromoteAdministrator ( string  ticket,
int  id 
)

Promote a user to an administrator.

Parameters:
ticket authentication ticket
id user id
Returns:

void DemoteAdministrator ( string  ticket,
int  id 
)

Demote a user to from an administrator.

Parameters:
ticket authentication ticket
id user id
Returns:

string Impersonate ( string  ticket,
int  id 
)

Impersonate an account (a user).

Parameters:
id user id
ticket authentication ticket
Returns:
authentication ticket for the impersonated user

void ChangePassword ( string  ticket,
int  accountid,
string  oldpassword,
string  newpassword 
)

Change password.

Parameters:
ticket athentication ticket
oldpassword old password
newpassword new password
accountid account id

void ChangePasswordMd5 ( string  ticket,
int  accountid,
string  oldpasswordhash,
string  newpassword 
)

Change password.

Parameters:
ticket athentication ticket
oldpassword old password
newpassword new password
accountid account id

bool IsPasswordValid ( string  ticket,
int  accountid,
string  password 
)

Check password.

Parameters:
ticket athentication ticket
password current password
accountid account id

bool IsPasswordValidMd5 ( string  ticket,
int  accountid,
string  password 
)

Check password with an Md5 hash.

Parameters:
ticket athentication ticket
password current password hash
accountid account id

<