protected boolean enoughRequiredAttributesAvailableToProcess ( final Map < String , Object > principalAttributes , final Map < String , Set < String > > requiredAttributes ) { if ( principalAttributes . isEmpty ( ) && ! requiredAttributes . isEmpty ( ) ) { LOGGER . debug ( "No principal attributes are found to satisfy defined attribute requirements" ) ; return false ; } if ( principalAttributes . size ( ) < requiredAttributes . size ( ) ) { LOGGER . debug ( "The size of the principal attributes that are [{}] does not match defined required attributes, " + "which indicates the principal is not carrying enough data to grant authorization" , principalAttributes ) ; return false ; } return true ; }
Enough required attributes available to process? Check collection sizes and determine if we have enough data to move on .