Skip to content
Permalink
Browse files

[oauth2] Use token url if refresh token url is not specified

The refresh token url is marked as optional -- so we fallback
on the token url if user has not specified a specific refresh URL
  • Loading branch information
nyalldawson committed Oct 24, 2018
1 parent 6fc36dc commit e24e5c786067ed03538e60a664d11e7d21b3396d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/auth/oauth2/qgso2.cpp
@@ -69,7 +69,8 @@ void QgsO2::initOAuthConfig()
mIsLocalHost = isLocalHost( QUrl( localpolicy.arg( mOAuth2Config->redirectPort() ) ) );

setTokenUrl( mOAuth2Config->tokenUrl() );
setRefreshTokenUrl( mOAuth2Config->refreshTokenUrl() );
// refresh token url is marked as optional -- we use the token url if user has not specified a specific refresh URL
setRefreshTokenUrl( !mOAuth2Config->refreshTokenUrl().isEmpty() ? mOAuth2Config->refreshTokenUrl() : mOAuth2Config->tokenUrl() );

setScope( mOAuth2Config->scope() );
// TODO: add support to O2 (or this class?) for state query param

0 comments on commit e24e5c7

Please sign in to comment.
You can’t perform that action at this time.