Beispiel #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            OAuthConfigBase config = OAuthConfigBase.GetConfig(AuthSystemApplicationName, PortalId);

            SettingsEditor.DataSource = config;
            SettingsEditor.DataBind();
        }
        protected OAuthClientBase(int portalId, AuthMode mode, string service)
        {
            //Set default Expiry to 14 days
            //oAuth v1 tokens do not expire
            //oAuth v2 tokens have an expiry
            AuthTokenExpiry = new TimeSpan(14, 0, 0, 0);
            Service         = service;

            APIKey    = OAuthConfigBase.GetConfig(Service, portalId).APIKey;
            APISecret = OAuthConfigBase.GetConfig(Service, portalId).APISecret;
            Mode      = mode;

            CallbackUri = Mode == AuthMode.Login
                                    ? new Uri(Globals.LoginURL(String.Empty, false))
                                    : new Uri(Globals.RegisterURL(String.Empty, String.Empty));
        }