mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-28 03:14:15 +08:00
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;
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
Auth_Ticket_Data data = {};
|
||||
|
@ -413,6 +413,7 @@ public:
|
||||
|
||||
void Callback(Common_Message *msg);
|
||||
uint32 getTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket );
|
||||
uint32 getWebApiTicket( const char *pchIdentity );
|
||||
void cancelTicket(uint32 number);
|
||||
EBeginAuthSessionResult beginAuth(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID);
|
||||
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
|
||||
HAuthTicket GetAuthTicketForWebApi( const char *pchIdentity )
|
||||
{
|
||||
PRINT_DEBUG("TODO: Steam_User::GetAuthTicketForWebApi %s\n", pchIdentity);
|
||||
return 0;
|
||||
PRINT_DEBUG("Steam_User::GetAuthTicketForWebApi %s\n", pchIdentity);
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user