/// <summary>
        /// Initializes connection information for the repository.  Should
        /// always be called before any other methods.
        /// </summary>
        /// <param name="endpoint">URL of the API endpoint</param>
        /// <param name="providerType">Type of provider only oAuth implemented</param>
        /// <param name="clientAppKey">App token</param>
        /// <param name="clientAppSecret">App secret</param>
        /// <param name="clientAuthToken">May be blank, but if blank auth token should be retrieved and set using SetAuthData before other calls are made.</param>
        /// <param name="clientAuthSecret">May be blank, but if blank auth secret should be retrieved and set using SetAuthData before other calls are made.</param>
        public void Initialize(string endpoint, string wellknown, RemoteProviderType providerType, TokenRefreshHandler refreshHandler, TokenExpiredCheckHandler expireHandler, string clientAppKey = "",
                               string clientAppSecret = "", string accessToken = "", string refreshToken = "")
        {
            _endpoint  = endpoint;
            _wellKnown = wellknown;

            _refreshHandler     = refreshHandler;
            _expireCheckHandler = expireHandler;

            ApiCredentials.APP_ID        = clientAppKey;
            ApiCredentials.APP_KEY       = clientAppSecret;
            ApiCredentials.ACCESS_TOKEN  = accessToken;
            ApiCredentials.REFRESH_TOKEN = refreshToken;
        }
 public void SetTokenExpiredHandler(TokenExpiredCheckHandler handler)
 {
     _expireCheckHandler = handler;
 }