iFun Engine API  1.0.0-b6053
Great Technology for Great Games
sign_in_with_apple_authentication.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2020 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_SIGN_IN_WITH_APPLE_AUTHENTICATION_H_
10 #define INCLUDE_FUNAPI_SERVICE_SIGN_IN_WITH_APPLE_AUTHENTICATION_H_
11 
12 #include <funapi/common/json.h>
13 #include <funapi/player_account.h>
14 #include <funapi/types.h>
15 
16 
17 namespace fun {
18 
19 struct FUNAPI_DLL_VISIBILITY SignInWithAppleAuthenticationRequest {
20  SignInWithAppleAuthenticationRequest(const string &app_id,
21  const string &id_token);
22 
23  // app_id
24  string app_id;
25  // id_token: JWT ID token
26  string id_token;
27 };
28 
29 
30 struct FUNAPI_DLL_VISIBILITY SignInWithAppleAuthenticationResponse {
32  SignInWithAppleAuthenticationResponse(const int64_t in_error_code,
33  const string &error_message);
34 
35  bool success;
36  int64_t error_code;
37  string error_message;
38 
39  string user_id;
40 };
41 
42 
43 typedef function<void(const SignInWithAppleAuthenticationRequest &request,
45  bool error)> SignInWithAppleAuthenticationResponseHandler;
46 
47 FUNAPI_DLL_VISIBILITY
48 void Authenticate(const SignInWithAppleAuthenticationRequest &request,
49  const SignInWithAppleAuthenticationResponseHandler &handler,
50  size_t timeout_in_ms = 0);
51 
52 } // namespace fun
53 
54 #endif // INCLUDE_FUNAPI_SERVICE_SIGN_IN_WITH_APPLE_AUTHENTICATION_H_
Definition: sign_in_with_apple_authentication.h:30
Definition: sign_in_with_apple_authentication.h:19
Definition: json.h:18