Inheritance: Android.App.Activity
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            this.RequestWindowFeature(WindowFeatures.NoTitle);

            // Create your application here
            var endpoint = this.Intent.GetStringExtra("signInUrl");

            var mainLayout = new LinearLayout(this);

            mainLayout.SetPadding(0, 0, 0, 0);

            var webClient = new AuthenticationWebViewClient();

            webView = new WebView(this);
            webView.VerticalScrollBarEnabled   = false;
            webView.HorizontalScrollBarEnabled = false;
            webView.SetWebViewClient(webClient);
            webView.Settings.JavaScriptEnabled = true;
            webView.LayoutParameters           = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
            webView.Settings.SavePassword      = false;
            webView.LoadUrl(endpoint);
            webView.AddJavascriptInterface(new AuthenticationJavaScriptInterface(this), "HTMLOUT");
            mainLayout.AddView(webView);
            this.SetContentView(mainLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent));

            if (thisActivity == null)
            {
                thisActivity = this;
            }
        }
        public void getTitleCallback(String jsResult)
        {
            Console.WriteLine(jsResult);
            var payload  = Encoding.UTF8.GetString(Convert.FromBase64String(jsResult.Replace("Success payload=", String.Empty)));
            var rawToken = JsonConvert.DeserializeObject <Dictionary <string, string> > (payload);

            AuthenticationEventManager.OnAuthenticationResponseArrived(new AuthenticationResponseEventArgs {
                Success   = true,
                TokenInfo = rawToken
            });
            PassiveAuthActivity.getInstance().Finish();
        }
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			this.RequestWindowFeature (WindowFeatures.NoTitle);

			// Create your application here
			var endpoint = this.Intent.GetStringExtra ("signInUrl");

			var mainLayout = new LinearLayout (this);
			mainLayout.SetPadding (0, 0, 0, 0);

			var webClient = new AuthenticationWebViewClient ();
			
			webView = new WebView(this);
			webView.VerticalScrollBarEnabled=false;
			webView.HorizontalScrollBarEnabled=false;
			webView.SetWebViewClient (webClient);
			webView.Settings.JavaScriptEnabled=true;
			webView.LayoutParameters= new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent,ViewGroup.LayoutParams.MatchParent);
			webView.Settings.SavePassword=false;
			webView.LoadUrl (endpoint);
			webView.AddJavascriptInterface(new AuthenticationJavaScriptInterface(this), "HTMLOUT");
			mainLayout.AddView(webView);
			this.SetContentView(mainLayout,new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent,ViewGroup.LayoutParams.MatchParent));

			if (thisActivity == null) {
				thisActivity = this;
			} 

		}