iFun Engine API  1.0.0-b2821
Great Technology for Great Games
 All Classes Files Functions Variables Typedefs Macros
nexon_platform_authentication.h
Go to the documentation of this file.
1 // Copyright (C) 2016 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_NEXON_PLATFORM_AUTHENTICATION_H_
10 #define INCLUDE_FUNAPI_SERVICE_NEXON_PLATFORM_AUTHENTICATION_H_
11 
12 #include <funapi/common/json.h>
13 #include <funapi/types.h>
14 
15 
16 namespace fun {
17 
20  NexonPlatformError(const string &code,
21  const string &type,
22  const string &message);
23 
24  string code;
25  string type;
26  string message;
27 };
28 
29 
31  explicit NexonPlatformAuthenticationRequest(const string &client_ticket);
32 
33  string client_ticket;
34 };
35 
36 
39 
40  NexonPlatformAuthenticationResponse(const string &user_no,
41  const string &token,
42  const string &refresh_token,
43  int64_t expires_in,
44  const Json &extra_data);
45 
47 
48  bool success;
49  string user_no;
50  string token;
51  string refresh_token;
52  int64_t expires_in;
53  Json extra_data;
54 
55  NexonPlatformError error;
56 };
57 
58 
59 typedef function<void(const NexonPlatformAuthenticationRequest &request,
61  bool error)> NexonPlatformAuthenticationResponseHandler;
62 
63 
64 void Authenticate(const NexonPlatformAuthenticationRequest &request,
65  const NexonPlatformAuthenticationResponseHandler &handler,
66  size_t timeout_in_ms = 0);
67 
68 bool AuthenticateSync(const NexonPlatformAuthenticationRequest &request,
70 
71 } // namespace fun
72 
73 #endif // INCLUDE_FUNAPI_SERVICE_NEXON_PLATFORM_AUTHENTICATION_H_
Definition: nexon_platform_authentication.h:37
Definition: nexon_platform_authentication.h:18
Definition: nexon_platform_authentication.h:30
Definition: json.h:27