private ArrayList < String > getRealmsFromJson ( JSONObject jsonChallenges ) { Iterator < String > challengesIterator = jsonChallenges . keys ( ) ; ArrayList < String > challenges = new ArrayList <> ( ) ; while ( challengesIterator . hasNext ( ) ) { challenges . add ( challengesIterator . next ( ) ) ; } return challenges ; }
Iterates a JSON object containing authorization challenges and builds a list of reals .