Skip to content

Commit 2a1fb1b

Browse files
authored
Merge pull request #134 from mribbons/master
Android - Implement support for space separated scopes
2 parents 341152c + b515014 commit 2a1fb1b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

android/src/main/java/io/fullstack/oauth/OAuthManagerProviders.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,19 @@ private static ServiceBuilder _oauth2ServiceBuilder(
268268
builder.scope(scopeStr);
269269
}
270270

271+
boolean rawScopes = (cfg.containsKey("rawScopes") && ((String)cfg.get("rawScopes")).equalsIgnoreCase("true"));
272+
271273
if (opts != null && opts.hasKey("scopes")) {
272274
scopes = (String) opts.getString("scopes");
273-
String scopeStr = OAuthManagerProviders.getScopeString(scopes, ",");
275+
String scopeStr = null;
276+
277+
if (!rawScopes)
278+
scopeStr = OAuthManagerProviders.getScopeString(scopes, ",");
279+
else
280+
scopeStr = scopes;
281+
274282
builder.scope(scopeStr);
275-
}
283+
}
276284

277285
if (callbackUrl != null) {
278286
builder.callback(callbackUrl);

0 commit comments

Comments
 (0)