Ejemplo n.º 1
0
        internal static void OnVerifyUserAuth(IntPtr address)
        {
            OnVerifyUserAuthCallback   callback     = null;
            VerifyUserAuthCallbackInfo callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <OnVerifyUserAuthCallback, VerifyUserAuthCallbackInfoInternal, VerifyUserAuthCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Contact the backend service to verify validity of an existing user auth token.
        /// This function is intended for server-side use only.
        /// </summary>
        /// <param name="options">structure containing information about the auth token being verified</param>
        /// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">a callback that is fired when the logout operation completes, either successfully or in error</param>
        public void VerifyUserAuth(VerifyUserAuthOptions options, object clientData, OnVerifyUserAuthCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <VerifyUserAuthOptionsInternal>(options);

            var completionDelegateInternal = new OnVerifyUserAuthCallbackInternal(OnVerifyUserAuth);
            var clientDataAddress          = IntPtr.Zero;

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_Auth_VerifyUserAuth(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
        /// <summary>
        /// Contact the backend service to verify validity of an existing user auth token.
        /// This function is intended for server-side use only.
        /// </summary>
        /// <param name="options">structure containing information about the auth token being verified</param>
        /// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">a callback that is fired when the logout operation completes, either successfully or in error</param>
        public void VerifyUserAuth(VerifyUserAuthOptions options, object clientData, OnVerifyUserAuthCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <VerifyUserAuthOptionsInternal, VerifyUserAuthOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnVerifyUserAuthCallbackInternal(OnVerifyUserAuthCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_Auth_VerifyUserAuth(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }