Download presentation
Presentation is loading. Please wait.
Published byMelanie Thornton Modified over 9 years ago
14
Online Service 1. Authorization Request (Start URL) 2. Login page 3. Credentials 4. Authorization page 5. User decision 6. Authorization token (Redirect URL) 7. Data access User App
17
In the Page handling log-in: private void AuthenticateWithWAB() { Uri StartUri = new Uri(lDPUrl); Uri EndUri = new Uri(CallbackUrl); WebAuthenticationBroker.AuthenticateAndContinue(StartUri, EndUri, null, WebAuthenticationOptions.None); } In App.xaml.cs: protected async override void OnActivated(IActivatedEventArgs e) { var args = e as IContinuationActivatedEventArgs; if (args != null && args.Kind == ActivationKind.WebAuthenticationBrokerContinuation) { var wabPage = rootFrame.Content as IWebAuthenticationContinuable; wabPage.ContinueWebAuthentication(args as WebAuthenticationBrokerContinuationEventArgs); }
21
void SaveCredential(string username, string password) { PasswordVault vault = new PasswordVault(); PasswordCredential cred = new PasswordCredential(“MyAppResource”, username, password); vault.Add(cred); } IReadOnlyList RetrieveCredential(string resource) { PasswordVault vault = new PasswordVault(); return vault.FindAllByResource(resource); }
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.