示例#1
0
        static BasicAuthApi()
        {
            //Setup default ShowAuthenticator
#if __IOS__
            ShowAuthenticator = (auth) => {
                var invoker = new Foundation.NSObject();
                invoker.BeginInvokeOnMainThread(() => {
                    var controller = new BasicAuthController(auth);
                    controller.Show();
                });
            };
#endif
        }
示例#2
0
        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
        }
示例#3
0
        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
        }