protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); SetIncidentId(); DefaultTokenCacheStore cache = new DefaultTokenCacheStore(this); authContext = new AuthenticationContext(this, Constants.AAD_AUTHORITY, false, cache); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById<Button>(Resource.Id.signIn_btn); button.Click += delegate { authContext.AcquireToken(this, Constants.SHAREPOINT_URL, Constants.AAD_CLIENT_ID, Constants.AAD_REDIRECT_URL, PromptBehavior.RefreshSession, new SignInCallback(this)); }; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); SetIncidentId(); DefaultTokenCacheStore cache = new DefaultTokenCacheStore(this); authContext = new AuthenticationContext(this, Constants.AAD_AUTHORITY, false, cache); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById <Button>(Resource.Id.signIn_btn); button.Click += delegate { authContext.AcquireToken(this, Constants.SHAREPOINT_URL, Constants.AAD_CLIENT_ID, Constants.AAD_REDIRECT_URL, PromptBehavior.RefreshSession, new SignInCallback(this)); }; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById <Button>(Resource.Id.MyButton); DefaultTokenCacheStore authTokenCache = new DefaultTokenCacheStore(this); authContext = new AuthenticationContext(this, Authority, false, authTokenCache); button.Click += button_Click; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); DefaultTokenCacheStore cache = new DefaultTokenCacheStore(this); authContext = new AuthenticationContext(this, "https://login.windows.net/Common/", false, cache); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById <Button>(Resource.Id.MyButton); button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); authContext.AcquireToken(this, discoveryServiceResourceId, ClientId, RedirectUri, PromptBehavior.Auto, new TestCallback(this)); }; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById <Button> (Resource.Id.myButton); button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); mAuthContext.AcquireToken(this, RESOURCE_ID, CLIENT_ID, REDIRECT_URL, USER_HINT, new TestCallback(this) ); }; DefaultTokenCacheStore cache = new DefaultTokenCacheStore(this); mAuthContext = new AuthenticationContext(this, AUTHORITY_URL, false, cache); }