Example #1
0
            public void ApproovTokenFetchResult(TokenInterfaceApproovResults results)
            {
                string token = ErrorToken;

                ApproovAttestation.AttestationResult result = results.Result;

                if (results.Result == ApproovAttestation.AttestationResult.Success)
                {
                    token = results.Token;
                    Log.Info(TAG, "Fetched Approov token (async)");
                }
                else
                {
                    Log.Info(TAG, "Failed to fetch Approov token (async)");
                }

                try
                {
                    tcs.SetResult(token);
                }
                catch (Exception exc)
                {
                    tcs.SetException(exc);
                }
            }
Example #2
0
        public string fetchToken(string uri)
        {
            TokenInterfaceApproovResults
                results = ApproovAttestation.Shared().FetchApproovTokenAndWait(uri);

            if (results.Result == ApproovAttestation.AttestationResult.Success)
            {
                return(results.Token);
            }
            else
            {
                return(Approover.TOKEN_FAILURE);
            }
        }
Example #3
0
        public override string FetchToken(string url)
        {
            TokenInterfaceApproovResults
                results = ApproovAttestation.Shared().FetchApproovTokenAndWait(url);

            if (results.Result == ApproovAttestation.AttestationResult.Success)
            {
                Log.Info(TAG, "Fetched Approov token");
                return(results.Token);
            }
            else
            {
                Log.Info(TAG, "Failed to fetch Approov token");
                return(ErrorToken);
            }
        }
Example #4
0
        public void ApproovTokenFetchResult(TokenInterfaceApproovResults results)
        {
            string token = Approover.TOKEN_FAILURE;

            ApproovAttestation.AttestationResult result = results.Result;

            if (results.Result == ApproovAttestation.AttestationResult.Success)
            {
                token = results.Token;
            }

            try
            {
                tcs.SetResult(token);
            }
            catch (Exception exc)
            {
                tcs.SetException(exc);
            }
        }