Ok OrgCode...
This commit is contained in:
@@ -432,6 +432,25 @@ namespace MConnectSDK
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce codice organizzazione
|
||||
/// </summary>
|
||||
public string organizationCode
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (_currParam.testMode)
|
||||
{
|
||||
answ = verifResp.organizationCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// TBD!!! qui la VERA CHIAMATA
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua lo step 1 di chiamata x ottenere il TOKEN iniziale
|
||||
/// </summary>
|
||||
private void doTokenStep()
|
||||
@@ -479,6 +498,7 @@ namespace MConnectSDK
|
||||
Random r = new Random();
|
||||
int access = r.Next(1, 999999999);
|
||||
int refresh = r.Next(1, 999999999);
|
||||
int orgCod = r.Next(1, 999);
|
||||
// salvo token
|
||||
verifResp = new verificationSuccessResponse()
|
||||
{
|
||||
@@ -487,7 +507,7 @@ namespace MConnectSDK
|
||||
token_type = "default",
|
||||
expires = 60000,
|
||||
client_id = _ClientID,
|
||||
organizationCode = "ABC"
|
||||
organizationCode = string.Format("A{0:000}", orgCod)
|
||||
};
|
||||
}
|
||||
else
|
||||
|
||||
@@ -164,4 +164,46 @@
|
||||
/// </summary>
|
||||
offline
|
||||
}
|
||||
/// <summary>
|
||||
/// Classe info UTENTE
|
||||
/// </summary>
|
||||
public class userData
|
||||
{
|
||||
/// <summary>
|
||||
/// Codice dell'ORGANIZATION (es asfd)
|
||||
/// </summary>
|
||||
public string organizationCode;
|
||||
/// <summary>
|
||||
/// Codice utente (es asfd.0002)
|
||||
/// </summary>
|
||||
public string user_id = "";
|
||||
/// <summary>
|
||||
/// Indica se sia attivo
|
||||
/// </summary>
|
||||
public bool isActive = false;
|
||||
/// <summary>
|
||||
/// Indica se sia ADMIN
|
||||
/// </summary>
|
||||
public bool isAdmin = false;
|
||||
/// <summary>
|
||||
/// UserName (univoco)
|
||||
/// </summary>
|
||||
public string UserName = "";
|
||||
/// <summary>
|
||||
/// Email
|
||||
/// </summary>
|
||||
public string Email = "";
|
||||
/// <summary>
|
||||
/// Cognome
|
||||
/// </summary>
|
||||
public string Cognome = "";
|
||||
/// <summary>
|
||||
/// Nome
|
||||
/// </summary>
|
||||
public string Nome = "";
|
||||
/// <summary>
|
||||
/// URL immagine utente (es http://{{BASE_URL}}/{{Org_code }}/user/img/{{IMG_URL}}.png))
|
||||
/// </summary>
|
||||
public string ImgUrl = "";
|
||||
}
|
||||
}
|
||||
|
||||
+10
-8
@@ -296,16 +296,18 @@ namespace TestClient
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
//MCC = new MConnectClient(txtMConnectID.Text.Trim(), txtClientID.Text.Trim(), param);
|
||||
//reqStatus = MCC.init();
|
||||
string orgCode = MCC.organizationCode;
|
||||
|
||||
//// sistemo retVal
|
||||
//saveTokenResp();
|
||||
synchronizationContext.Post(new SendOrPostCallback(o =>
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("--------------------------------------------------");
|
||||
sb.AppendLine("ORGANIZATION CODE: " + orgCode);
|
||||
sb.AppendLine("--------------------------------------------------");
|
||||
lblConsole.Text = sb.ToString();
|
||||
|
||||
//synchronizationContext.Post(new SendOrPostCallback(o =>
|
||||
//{
|
||||
// refreshRequestStatus();
|
||||
//}), "");
|
||||
refreshRequestStatus();
|
||||
}), "");
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user