mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Include refresh token grantype before throwing an exception when building oauth2 operation
This commit is contained in:
parent
99334c2e45
commit
7f98b3804c
@ -65,10 +65,12 @@ public class OwnCloudOAuth2RequestBuilder implements OAuth2RequestBuilder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RemoteOperation buildOperation() {
|
public RemoteOperation buildOperation() {
|
||||||
if (OAuth2GrantType.AUTHORIZATION_CODE != mGrantType) {
|
if (mGrantType != OAuth2GrantType.AUTHORIZATION_CODE &&
|
||||||
|
mGrantType != OAuth2GrantType.REFRESH_TOKEN) {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"Unsupported grant type. Only " +
|
"Unsupported grant type. Only " +
|
||||||
OAuth2GrantType.AUTHORIZATION_CODE.getValue() + " is supported"
|
OAuth2GrantType.AUTHORIZATION_CODE.getValue() + " and " +
|
||||||
|
OAuth2GrantType.REFRESH_TOKEN + " are supported"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
OAuth2ClientConfiguration clientConfiguration = mOAuth2Provider.getClientConfiguration();
|
OAuth2ClientConfiguration clientConfiguration = mOAuth2Provider.getClientConfiguration();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user