コード例 #1
0
        public static void Authenticate(GamedoniaBackend.CredentialsType authenticationType, Dictionary <string, object> credentials, Action <bool> callback)
        {
            IGamedoniaAuthentication authentication = null;

            switch (authenticationType)
            {
            case GamedoniaBackend.CredentialsType.GAMECENTER:
                authentication = new GamecenterAuthentication();
                break;

            case GamedoniaBackend.CredentialsType.FACEBOOK:
                authentication = new FacebookAuthentication((string)credentials["fb_uid"], (string)credentials["fb_access_token"]);
                break;

            case GamedoniaBackend.CredentialsType.SILENT:
                authentication = new SilentAuthentication();
                break;

            case GamedoniaBackend.CredentialsType.GOOGLE:
                authentication = new GoogleAuthentication();
                break;

            default:
                authentication = new SessionTokenAuthentication();
                break;
            }

            authentication.Authenticate(callback);
        }
コード例 #2
0
ファイル: GamedoniaUsers.cs プロジェクト: Derojo/Medical
        public static void Authenticate(GamedoniaBackend.CredentialsType authenticationType, Dictionary<string,object> credentials, Action<bool> callback)
        {
            IGamedoniaAuthentication authentication = null;
            switch (authenticationType) {
                case GamedoniaBackend.CredentialsType.GAMECENTER:
                    authentication = new GamecenterAuthentication();
                    break;
                case GamedoniaBackend.CredentialsType.FACEBOOK:
                    authentication = new FacebookAuthentication((string) credentials["fb_uid"], (string) credentials["fb_access_token"]);
                    break;
                case GamedoniaBackend.CredentialsType.SILENT:
                    authentication = new SilentAuthentication();
                    break;
                case GamedoniaBackend.CredentialsType.GOOGLE:
                    authentication = new GoogleAuthentication();
                    break;
                default:
                    authentication = new SessionTokenAuthentication();
                    break;
            }

            authentication.Authenticate(callback);
        }