Class UserLoginWS
- Namespace
- PHCWS
- Assembly
- PHCWS.dll
url = urlBase."REST/UserLoginWS/";
[WebService(Namespace = "http://www.phcgo.net/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[DesignerGenerated]
public class UserLoginWS : PHCGenericWS, IComponent, IDisposable, IServiceProvider
- Inheritance
-
UserLoginWS
Methods
AuthenticateNotifyUser(string, string)
[WebMethod]
public PHCResult AuthenticateNotifyUser(string userName, string device)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
userName |
string | |
device |
string |
Returns
RegisterNotifyUser(string)
[WebMethod]
public PHCResult RegisterNotifyUser(string userName)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
userName |
string |
Returns
SendAuthenticationCodeByEmail(string)
[WebMethod]
public PHCResult SendAuthenticationCodeByEmail(string userName)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
userName |
string |
Returns
UserLoginValidation(string, string, string, string, string)
[WebMethod]
public PHCResult UserLoginValidation(string userCode, string password, string applicationType, string company, string deviceId)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
userCode |
string | |
password |
string | |
applicationType |
string | |
company |
string | |
deviceId |
string |
Returns
ValidateRegistrationNotifyUser(string, string)
[WebMethod]
public PHCResult ValidateRegistrationNotifyUser(string userName, string sharedCode)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
userName |
string | |
sharedCode |
string |
Returns
VerifyAuthenticationNotifyUser(string, string, string)
[WebMethod]
public PHCResult VerifyAuthenticationNotifyUser(string userName, string deviceId, string deviceName)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
userName |
string | |
deviceId |
string | |
deviceName |
string |
Returns
VerifyEmailAuthenticationCode(string)
[WebMethod]
public PHCResult VerifyEmailAuthenticationCode(string verificationCode)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
verificationCode |
string |
Returns
checkHashAvailable(string)
Verifica a disponibilidade de um hash específico.
[WebMethod]
public PHCResult checkHashAvailable(string hash)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
hash |
string | O hash a ser verificado para disponibilidade. |
Returns
Remarks
Este método realiza a verificação de um hash para garantir que ele esteja disponível. Caso haja algum erro no processo de validação, uma mensagem de erro será retornada.
firstTimePassword(string, string, string)
Create first password to user.
[WebMethod]
public PHCResult firstTimePassword(string hash, string userPass, string email)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
hash |
string | Indicates the user that you want to log on to BackEnd (server), corresponds to the field usercode of UserVO |
userPass |
string | User password which you want to log on BackEnd (server), corresponds to the field password of UserVO |
email |
string | User e-mail which you want to log on BackEnd (server), corresponds to the field email of UserVO |
Returns
getBackEndInfo(LoginInfoVO)
Verifica a disponibilidade do BackEnd (servidor) e retorna as informações associadas.
[WebMethod]
public PHCResult getBackEndInfo(LoginInfoVO loginInfoVO)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
loginInfoVO |
LoginInfoVO | Objeto contendo as informações de login, incluindo: usercode, que indica o usuário que deseja se conectar ao BackEnd, correspondente ao campo UserVO em UserVO. Company, que indica a empresa desejada, correspondente ao campo PHCBusinessLayer.CompanyVO.CompanyName em CompanyVO. |
Returns
- PHCResult
Retorna um PHCResult, que contém um objeto BackEndInfoVO com as informações sobre o BackEnd ou mensagens de erro.
Remarks
Este serviço deve ser o primeiro a ser chamado quando o FrontEnd for iniciado, pois além de verificar a disponibilidade do BackEnd, ele também executa tarefas assíncronas, como preparar as informações do usuário (como produtos e acessos disponíveis).
getSubscriptionUrl(string, string)
[WebMethod]
public PHCResult getSubscriptionUrl(string userCode, string password)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
userCode |
string | |
password |
string |
Returns
maintenanceCompanies(List<string>)
Performs installation and maintenance.
[WebMethod]
public PHCResult maintenanceCompanies(List<string> companies)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
companies |
List<string> | Indicates which company want to make installation and maintenance, corresponds to the field 'name' the CompanyVO. |
Returns
resetUserPass(string, bool, string)
Performs password recovery process.
[WebMethod]
public PHCResult resetUserPass(string email, bool runWarnings, string returnUrl)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
email |
string | Identifies user'semail about which to restore the user's password |
runWarnings |
bool | Indicates whether to run the rules of 'warning' user / system when recording. The rules should be rendered in response to questions such as Yes / No. If the user answers Yes to all of them, we should call this method again with this parameter at False |
returnUrl |
string | Specifies the URL from where the user come from (normally this is the URL of a FX application, e.g. Drive FX, etc...) |
Returns
Remarks
There is another set of user rules / system which is considered as fatal type rules, which always run regardless of the value of this parameter, for example, the rule does not save a document with the same number of other existing in the database.
resetUserPassCode(string, bool)
Reset of user password.
[WebMethod]
public PHCResult resetUserPassCode(string usercode, bool runWarnings)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
usercode |
string | Identifies usercode of user about if he wants reset password |
runWarnings |
bool | Indicates whether to run the rules of 'warning' user / system when recording. The rules should be rendered in response to questions such as Yes / No. If the user answers Yes to all of them, we should call this method again with this parameter at False There is another set of user rules / system which is considered as fatal type rules, which always run regardless of the value of this parameter, for example, the rule does not save a document with the same number of other existing in the database. |
Returns
setTimezone(int)
Sets the timezone in which the customer who is calling the engine.
[WebMethod]
public PHCResult setTimezone(int offset)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
offset |
int | Indicates the difference in minutes for the UTC time. |
Returns
- PHCResult
This operation does not return any results.
Remarks
This service is used to set the compensation of dates from UTC (server's time zone) if the client is in a different time zone.
switchCompany(string)
[WebMethod]
public PHCResult switchCompany(string company)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
company |
string |
Returns
userLoginCompany(string, string, string, string)
User Login
[WebMethod]
public PHCResult userLoginCompany(string userCode, string password, string applicationType, string company)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
userCode |
string | Indicates the user that you want to log in in the application, corresponds to the field UserCode of the entity UserVO. |
password |
string | User's password. |
applicationType |
string | What is the corresponding FX Engine ID of the external application that will use the Webservices and WebMethods of PHCGO after login, this ID is provided by PHC for one specific external application. This ID must first be authorized by PHC, second be authorized by PHCGO client application, which should not be confused with the application that is currently attempting to login, as this is considered the external application. And third, the corresponding user given in the parameter userCode must have in your profile associated with the Engine product, which in other words means that the client must first obtain a permit from the engine of your distributor before trying to access the Web Services with an external application. |
company |
string | Indicates the company with which you want to work after you have logged in, the value of this parameter corresponds to the name of the database and not the title that may have been redefined by the user, this value can be found in PHCGO in the About section. To facilitate this process, especially in installations where there is only one database, the value of this parameter can be empty "", in that in case the application will check which database the user has access to, and will choose, in no specific order, the first one on that list. |
Returns
- PHCResult
PHCResult containing the entity UsVO in property Result corresponding to the login that is being carried out, or messages in property Messages produced by the server in this process.
Remarks
When you want to interact with the PHCGO application to perform certain process, you must create a Login, so this service should be the first to be called. Then if the creation of the login has been successfully you have to save the value of the 'token' field of the 'UsVO' object that is returned in PHCResult. In the following calls you must include this value in the request header with the key 'Engine-Auth'. If it is not possible to use the headers, then as an alternative, you must include it in the URL of the call, not forgetting that in this case you must use the parse of the token value, for example if you use .Net it will be System.Web.HttpUtility.UrlEncode(UsVo .token)
userLogout()
Ends the current session.
[WebMethod]
public PHCResult userLogout()
Returns
Remarks
If it is not called this service when you shut down your work session, it will be finished by the end of X application downtime, this service is to provide faster the memory occupied by the login for other application purposes.
validateUserPassword(string, string)
This function is for reseter use only. We use this to check in realtime if the password is valid and give feedback to the user
[WebMethod]
public PHCResult validateUserPassword(string hash, string userPass)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
hash |
string | User identifier hashed |
userPass |
string | New user password |
Returns
- PHCResult
If isnt valid returns a message error. If is valid returns a empty PHC Result
verifyUserIsValidPass(string, string)
[WebMethod]
public PHCResult verifyUserIsValidPass(string pass, string hash)
Parameters
| Nome | Tipo | Descrição |
|---|---|---|
pass |
string | |
hash |
string |