File tree Expand file tree Collapse file tree
auth0/src/main/java/com/auth0/android/authentication/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public abstract class BaseCredentialsManager internal constructor(
3535 public abstract fun saveApiCredentials (
3636 apiCredentials : APICredentials ,
3737 audience : String ,
38- scope : String?
38+ scope : String? = null
3939 )
4040
4141 public abstract fun getCredentials (callback : Callback <Credentials , CredentialsManagerException >)
@@ -170,7 +170,8 @@ public abstract class BaseCredentialsManager internal constructor(
170170 if (requiredScope == null ) {
171171 return false
172172 }
173- val storedScopes = storedScope.orEmpty().split(" " ).filter { it.isNotEmpty() }.toMutableSet()
173+ val storedScopes =
174+ storedScope.orEmpty().split(" " ).filter { it.isNotEmpty() }.toMutableSet()
174175 if (ignoreOpenid) {
175176 storedScopes.remove(" openid" )
176177 }
@@ -212,6 +213,6 @@ public abstract class BaseCredentialsManager internal constructor(
212213 */
213214 protected fun getAPICredentialsKey (audience : String , scope : String? ): String {
214215 // Use audience if scope is null else use a combination of audience and scope
215- return if (scope == null ) audience else " $audience ::$scope "
216+ return if (scope == null ) audience else " $audience ::${ scope.replace( " " , " :: " )} "
216217 }
217218}
You can’t perform that action at this time.
0 commit comments