private Collection<String> getScopes(Jwt jwt) {
		for ( String attributeName : WELL_KNOWN_SCOPE_ATTRIBUTE_NAMES ) {
			Object scopes = jwt.getClaims().get(attributeName);
			if (scopes instanceof String) {
				if (StringUtils.hasText((String) scopes)) {
					return Arrays.asList(((String) scopes).split(" "));
				} else {
					return Collections.emptyList();
				}
			} else if (scopes instanceof Collection) {
				return (Collection<String>) scopes;
			}
		}

		return Collections.emptyList();
	}
private Collection<String> getScopes(Jwt jwt) {
		for ( String attributeName : WELL_KNOWN_SCOPE_ATTRIBUTE_NAMES ) {
			Object scopes = jwt.getClaims().get(attributeName);
			if (scopes instanceof String) {
				if (StringUtils.hasText((String) scopes)) {
					return Arrays.asList(((String) scopes).split(" "));
				} else {
					return Collections.emptyList();
				}
			} else if (scopes instanceof Collection) {
				return (Collection<String>) scopes;
			}
		}

		return Collections.emptyList();
	}
private Collection < String > getScopes ( Jwt jwt ) { for ( String attributeName : WELL_KNOWN_SCOPE_ATTRIBUTE_NAMES ) { Object scopes = jwt . getClaims ( ) . get ( attributeName ) ; if ( scopes instanceof String ) { if ( StringUtils . hasText ( ( String ) scopes ) ) { return Arrays . asList ( ( ( String ) scopes ) . split ( " " ) ) ; } else { return Collections . emptyList ( ) ; } } else if ( scopes instanceof Collection ) { return ( Collection < String > ) scopes ; } } return Collections . emptyList ( ) ; }
Gets the scopes from a {@link Jwt} token
@param jwt The {@link Jwt} token
@return The scopes from the token
Gets the scopes from a {