@ Override public List < FoxHttpAuthorization > getAuthorization ( URLConnection connection , FoxHttpAuthorizationScope foxHttpAuthorizationScope , FoxHttpClient foxHttpClient ) { ArrayList < FoxHttpAuthorization > foxHttpAuthorizationList = new ArrayList <> ( ) ; for ( Map . Entry < String , ArrayList < FoxHttpAuthorization > > entry : foxHttpAuthorizations . entrySet ( ) ) { if ( RegexUtil . doesURLMatch ( foxHttpAuthorizationScope . toString ( ) , foxHttpClient . getFoxHttpPlaceholderStrategy ( ) . processPlaceholders ( entry . getKey ( ) , foxHttpClient ) ) ) { foxHttpAuthorizationList . addAll ( entry . getValue ( ) ) ; } } if ( foxHttpAuthorizations . containsKey ( FoxHttpAuthorizationScope . ANY . toString ( ) ) && ( foxHttpAuthorizationList . isEmpty ( ) ) ) { foxHttpAuthorizationList . addAll ( foxHttpAuthorizations . get ( FoxHttpAuthorizationScope . ANY . toString ( ) ) ) ; } return foxHttpAuthorizationList ; }
Returns a list of matching FoxHttpAuthorizations based on the given FoxHttpAuthorizationScope