O1Beatport::O1Beatport(QObject *parent) : O1(parent), _dialogContent(new Ui::BeatportAuthentication), _dialog(new QDialog), _status(InitialState) { if(QByteArray(BEATPORT_API_KEY).isEmpty() || QByteArray(BEATPORT_API_SECRET).isEmpty()) { _status = APIKeysMissing; return; } else { setClientId(BEATPORT_API_KEY); setClientSecret(BEATPORT_API_SECRET); } _dialogContent->setupUi(_dialog); connect(_dialogContent->webView, &QWebView::linkClicked, this, &O1Beatport::onLinkClickedInsideWebView); setAccessTokenUrl(QUrl("https://oauth-api.beatport.com/identity/1/oauth/access-token")); setAuthorizeUrl(QUrl("https://oauth-api.beatport.com/identity/1/oauth/authorize")); setRequestTokenUrl(QUrl("https://oauth-api.beatport.com/identity/1/oauth/request-token")); connect(this, &O1::openBrowser, this, &O1Beatport::onOpenBrowser); connect(this, &O1::closeBrowser, _dialog, &QDialog::hide); connect(this, &O1::linkedChanged, this, &O1Beatport::onLinkingChanged); connect(this, &O1::linkingSucceeded, this, &O1Beatport::onLinkingSucceeded); }
void O1Tomboy::setBaseURL(const QString &value) { setRequestTokenUrl(QUrl(value + QStringLiteral("/oauth/request_token"))); setAuthorizeUrl(QUrl(value + QStringLiteral("/oauth/authorize"))); setAccessTokenUrl(QUrl(value + QStringLiteral("/oauth/access_token"))); setClientId(QStringLiteral("anyone")); setClientSecret(QStringLiteral("anyone")); }
GoogleService::GoogleService(const AuthService& baseAuth) : OidcService(baseAuth) { setRedirectEndpoint(configurationProperty(RedirectEndpointProperty)); setClientId(configurationProperty(ClientIdProperty)); setClientSecret(configurationProperty(ClientSecretProperty)); setAuthEndpoint("https://accounts.google.com/o/oauth2/v2/auth"); setTokenEndpoint("https://www.googleapis.com/oauth2/v4/token"); setUserInfoEndpoint("https://www.googleapis.com/oauth2/v3/userinfo"); setAuthenticationScope("openid email profile"); setName("google"); setDescription("Google Account"); setPopupWidth(550); }