File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
auth0/src/main/java/com/auth0/android/request/internal/validator Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import java.net.URI
1010 */
1111public class CustomTokenExchangeValidator : RequestValidator {
1212
13- private val reservedNameSpace = listOf (
13+ private val reservedNamespaces = listOf (
1414 " http://auth0.com" ,
1515 " https://auth0.com" ,
1616 " http://okta.com" ,
@@ -23,8 +23,16 @@ public class CustomTokenExchangeValidator : RequestValidator {
2323 override fun validate (options : RequestOptions ) {
2424 val subjectTokenType = options.parameters[" subject_token_type" ] as String
2525
26+ if (subjectTokenType.isEmpty()){
27+ throw AuthenticationException (
28+ " Invalid URI" , IllegalArgumentException (
29+ " The passed URI must not be an empty String"
30+ )
31+ )
32+ }
33+
2634 // Check if it's a reserved namespace
27- if (reservedNameSpace .contains(subjectTokenType)) {
35+ if (reservedNamespaces .contains(subjectTokenType)) {
2836 throw AuthenticationException (
2937 " Invalid URI" , IllegalArgumentException (
3038 " The passed URI is a reserved namespace and cannot be used"
You can’t perform that action at this time.
0 commit comments