iFun Engine API  1.0.0-b2821
Great Technology for Great Games
 All Classes Files Functions Variables Typedefs Macros
authentication.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2017 iFunFactory Inc. All Rights Reserved.
2 //
3 // This work is confidential and proprietary to iFunFactory Inc. and
4 // must not be used, disclosed, copied, or distributed without the prior
5 // consent of iFunFactory Inc.
6 
9 #ifndef INCLUDE_FUNAPI_SERVICE_AUTHENTICATION_H_
10 #define INCLUDE_FUNAPI_SERVICE_AUTHENTICATION_H_
11 
12 #include <funapi/player_account.h>
13 #include <funapi/types.h>
14 
15 
16 namespace fun {
17 
18 typedef string AuthenticationKey;
19 
20 // MakeFacebookAuthenticationKey is deprecated
21 // please use FacebookAuthenticationRequest instead.
22 AuthenticationKey MakeFacebookAuthenticationKey(
23  const string &facebook_access_token);
24 
25 // MakeGooglePlusAuthenticationKey is deprecated
26 // please use GooglePlusAuthenticationRequest instead.
27 AuthenticationKey MakeGooglePlusAuthenticationKey(
28  const string &google_client_id,
29  const string &google_access_token);
30 
31 // MakeNexonToyAuthenticationKey is deprecated
32 // please use NexonToyAuthenticationRequest instead.
33 AuthenticationKey MakeNexonToyAuthenticationKey(
34  int64_t svc_id,
35  const string &client_id,
36  const string &np_sn,
37  const string &np_token);
38 
39 
41  AccountAuthenticationRequest(const string &service_provider,
42  const string &local_account,
43  const AuthenticationKey &key);
44 
45  PlayerAccount player_account;
46  AuthenticationKey authentication_key;
47 };
48 
49 
52  AccountAuthenticationResponse(const int64_t &response_reason_code,
53  const string &response_reason_description);
54 
55  bool success;
56  int64_t reason_code;
57  string reason_description;
58 };
59 
60 
62  AccountPersonalInfoRequest(const string &service_provider,
63  const string &local_account,
64  const AuthenticationKey &key);
65 
66  PlayerAccount player_account;
67  AuthenticationKey authentication_key;
68 };
69 
70 
74  const PlayerAccountVector &friend_accounts);
76  const int64_t &response_reason_code,
77  const string &response_reason_description);
78 
79  bool success;
80  int64_t reason_code;
81  string reason_description;
82  PlayerAccountVector friends;
83 };
84 
85 
86 typedef function<void(const AccountAuthenticationRequest &request,
87  const AccountAuthenticationResponse &response,
88  const bool &error)> AuthenticationResponseHandler;
89 
90 
91 typedef function<void(const AccountPersonalInfoRequest &request,
92  const AccountPersonalInfoResponse &response,
93  const bool &error)> PersonalInfoResponseHandler;
94 
95 // Authenticate is deprecated,
96 // please use Authenticate in {platform}_authentication.h instead.
97 void Authenticate(const AccountAuthenticationRequest &request,
98  const AuthenticationResponseHandler &handler);
99 // AuthenticateSync is deprecated,
100 // please use AuthenticateSync in {platform}_authentication.h instead.
101 bool AuthenticateSync(const AccountAuthenticationRequest &request,
103 
104 // GetPersonalInfo is deprecated,
105 // please use GetPersonalInfo in {platform}_authentication.h instead.
106 void GetPersonalInfo(const AccountPersonalInfoRequest &request,
107  const PersonalInfoResponseHandler &handler);
108 // GetPersonalInfoSync is deprecated,
109 // please use GetPersonalInfoSync in {platform}_authentication.h instead.
110 bool GetPersonalInfoSync(const AccountPersonalInfoRequest &request,
111  AccountPersonalInfoResponse *response);
112 
113 } // namespace fun
114 
115 #endif // INCLUDE_FUNAPI_SERVICE_AUTHENTICATION_H_
Account Id.
Definition: player_account.h:20
Definition: authentication.h:40
Definition: authentication.h:61
Definition: authentication.h:71
Definition: authentication.h:50