static BasicAuthApi() { //Setup default ShowAuthenticator #if __IOS__ ShowAuthenticator = (auth) => { var invoker = new Foundation.NSObject(); invoker.BeginInvokeOnMainThread(() => { var controller = new BasicAuthController(auth); controller.Show(); }); }; #endif }
public OAuthPasswordApi(string identifier, string clientId, string clientSecret, string serverUrl, string tokenUrl, string refreshUrl) : base(identifier, clientId, clientSecret, tokenUrl, refreshUrl) { BaseAddress = new Uri(serverUrl); Scopes = new [] { "null" }; #if __IOS__ CurrentShowAuthenticator = (auth) => { var invoker = new Foundation.NSObject(); invoker.BeginInvokeOnMainThread(() => { var controller = new BasicAuthController(auth); controller.Show(); }); }; #endif }
public BasicAuthApi(string identifier, string loginUrl, HttpMessageHandler handler = null) : base(identifier, handler) { LoginUrl = loginUrl; authenticator = new BasicAuthAuthenticator(Client, loginUrl); #if __IOS__ ShowAuthenticator = (auth) => { var invoker = new Foundation.NSObject(); invoker.BeginInvokeOnMainThread(() => { var controller = new BasicAuthController(auth); controller.Show(); }); }; #endif }