impl for GetAuthTicketForWebApi
This commit is contained in:
parent
caa4024de3
commit
d95ceb0fc9
17
dll/base.cpp
17
dll/base.cpp
@ -387,6 +387,23 @@ uint32 Auth_Ticket_Manager::getTicket( void *pTicket, int cbMaxTicket, uint32 *p
|
|||||||
return ttt;
|
return ttt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32 Auth_Ticket_Manager::getWebApiTicket( const char* pchIdentity )
|
||||||
|
{
|
||||||
|
// https://docs.unity.com/ugs/en-us/manual/authentication/manual/platform-signin-steam
|
||||||
|
GetTicketForWebApiResponse_t data{};
|
||||||
|
uint32 cbTicket = 0;
|
||||||
|
Auth_Ticket_Data ticket_data = getTicketData(data.m_rgubTicket, STEAM_AUTH_TICKET_SIZE, &cbTicket);
|
||||||
|
data.m_cubTicket = (int)cbTicket;
|
||||||
|
uint32 ttt = ticket_data.number;
|
||||||
|
data.m_hAuthTicket = ttt;
|
||||||
|
data.m_eResult = k_EResultOK;
|
||||||
|
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data), STEAM_TICKET_PROCESS_TIME);
|
||||||
|
|
||||||
|
outbound.push_back(ticket_data);
|
||||||
|
|
||||||
|
return ttt;
|
||||||
|
}
|
||||||
|
|
||||||
CSteamID Auth_Ticket_Manager::fakeUser()
|
CSteamID Auth_Ticket_Manager::fakeUser()
|
||||||
{
|
{
|
||||||
Auth_Ticket_Data data = {};
|
Auth_Ticket_Data data = {};
|
||||||
|
@ -413,6 +413,7 @@ public:
|
|||||||
|
|
||||||
void Callback(Common_Message *msg);
|
void Callback(Common_Message *msg);
|
||||||
uint32 getTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket );
|
uint32 getTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket );
|
||||||
|
uint32 getWebApiTicket( const char *pchIdentity );
|
||||||
void cancelTicket(uint32 number);
|
void cancelTicket(uint32 number);
|
||||||
EBeginAuthSessionResult beginAuth(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID);
|
EBeginAuthSessionResult beginAuth(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID);
|
||||||
bool endAuth(CSteamID id);
|
bool endAuth(CSteamID id);
|
||||||
|
@ -319,8 +319,10 @@ HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTic
|
|||||||
// the ticket will be returned in callback GetTicketForWebApiResponse_t
|
// the ticket will be returned in callback GetTicketForWebApiResponse_t
|
||||||
HAuthTicket GetAuthTicketForWebApi( const char *pchIdentity )
|
HAuthTicket GetAuthTicketForWebApi( const char *pchIdentity )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("TODO: Steam_User::GetAuthTicketForWebApi %s\n", pchIdentity);
|
PRINT_DEBUG("Steam_User::GetAuthTicketForWebApi %s\n", pchIdentity);
|
||||||
return 0;
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
|
|
||||||
|
return ticket_manager->getWebApiTicket(pchIdentity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authenticate ticket from entity steamID to be sure it is valid and isnt reused
|
// Authenticate ticket from entity steamID to be sure it is valid and isnt reused
|
||||||
|
Loading…
x
Reference in New Issue
Block a user