net.loginbuddy.common/src/main/java/net/loginbuddy/common/api/HttpHelper.java
/**
   * Check if the user chose to dynamically set a provider
   */
Check if the user chose to dynamically set a provider
Check if the user chose to dynamically set a provider
public static boolean checkForDynamicProvider(String provider, ParameterValidatorResult issuer,
                                                 ParameterValidatorResult discoveryUrlResult, boolean acceptDynamicProvider) {
    boolean result = false;
    if (acceptDynamicProvider) {
      result = Constants.DYNAMIC_PROVIDER.getKey().equalsIgnoreCase(provider);
      result = result && issuer.getResult().equals(RESULT.VALID);
      result = result && HttpHelper.couldBeAUrl(issuer.getValue());
      if (discoveryUrlResult.getResult().equals(RESULT.VALID)) {
        result = result && HttpHelper.couldBeAUrl(discoveryUrlResult.getValue());
      }
    }
    return result;
  }
public static boolean checkForDynamicProvider ( String provider , ParameterValidatorResult issuer , ParameterValidatorResult discoveryUrlResult , boolean acceptDynamicProvider ) { boolean result = false ; if ( acceptDynamicProvider ) { result = Constants . DYNAMIC_PROVIDER . getKey ( ) . equalsIgnoreCase ( provider ) ; result = result && issuer . getResult ( ) . equals ( RESULT . VALID ) ; result = result && HttpHelper . couldBeAUrl ( issuer . getValue ( ) ) ; if ( discoveryUrlResult . getResult ( ) . equals ( RESULT . VALID ) ) { result = result && HttpHelper . couldBeAUrl ( discoveryUrlResult . getValue ( ) ) ; } } return result ; }
Check if the user chose to dynamically set a provider
Check if the user chose to dynamically set a provider