public int validate(String realm, String returnTo, boolean compatibility, boolean enforceRpId) { int result; // 1. match the return_to against the realm result = match(realm, returnTo); if (OK != result) { _log.error("Return URL: " + returnTo + " does not match realm: " + realm); return result; } // 2. match the return_to against RP endpoints discovered from the realm if (!compatibility && enforceRpId) { result = validateRpId(realm, returnTo); if (OK != result) { _log.error("Failed to validate return URL: " + returnTo + " against endpoints discovered from the RP's realm."); } } else if (!compatibility && !enforceRpId && _isOP) { _log.warn("RP discovery / realm validation disabled; " + "this option SHOULD be enabled for OPs"); } return result; }
public int validate(String realm, String returnTo, boolean compatibility, boolean enforceRpId) { int result; // 1. match the return_to against the realm result = match(realm, returnTo); if (OK != result) { _log.error("Return URL: " + returnTo + " does not match realm: " + realm); return result; } // 2. match the return_to against RP endpoints discovered from the realm if ( ! compatibility && enforceRpId) { result = validateRpId(realm, returnTo); if (OK != result) _log.error("Failed to validate return URL: " + returnTo + " against endpoints discovered from the RP's realm."); } else if ( ! compatibility && ! enforceRpId && _isOP) { _log.warn("RP discovery / realm validation disabled; " + "this option SHOULD be enabled for OPs"); } return result; }
public int validate(String realm, String returnTo, boolean compatibility, boolean enforceRpId) { int result; // 1. match the return_to against the realm result = match(realm, returnTo); if (OK != result) { _log.error("Return URL: " + returnTo + " does not match realm: " + realm); return result; } // 2. match the return_to against RP endpoints discovered from the realm if ( ! compatibility && enforceRpId) { result = validateRpId(realm, returnTo); if (OK != result) _log.error("Failed to validate return URL: " + returnTo + " against endpoints discovered from the RP's realm."); } else if ( ! compatibility && ! enforceRpId && _isOP) { _log.warn("RP discovery / realm validation disabled; " + "this option SHOULD be enabled for OPs"); } return result; }
public int validate(String realm, String returnTo, boolean compatibility, boolean enforceRpId) { int result; // 1. match the return_to against the realm result = match(realm, returnTo); if (OK != result) { _log.error("Return URL: " + returnTo + " does not match realm: " + realm); return result; } // 2. match the return_to against RP endpoints discovered from the realm if ( ! compatibility && enforceRpId) { result = validateRpId(realm, returnTo); if (OK != result) _log.error("Failed to validate return URL: " + returnTo + " against endpoints discovered from the RP's realm."); } else if ( ! compatibility && ! enforceRpId && _isOP) { _log.warn("RP discovery / realm validation disabled; " + "this option SHOULD be enabled for OPs"); } return result; }
public int validate(String realm, String returnTo, boolean compatibility, boolean enforceRpId) { int result; // 1. match the return_to against the realm result = match(realm, returnTo); if (OK != result) { _log.error("Return URL: " + returnTo + " does not match realm: " + realm); return result; } // 2. match the return_to against RP endpoints discovered from the realm if ( ! compatibility && enforceRpId) { result = validateRpId(realm, returnTo); if (OK != result) _log.error("Failed to validate return URL: " + returnTo + " against endpoints discovered from the RP's realm."); } else if ( ! compatibility && ! enforceRpId && _isOP) { _log.warn("RP discovery / realm validation disabled; " + "this option SHOULD be enabled for OPs"); } return result; }