「应用安全」OAuth和OpenID Connect的全面比较(29)


// Redirection Endpoint are checked.
// If the specified redirect URI is not an absolute one.
if ( redirectUri.isAbsolute() == false )
{
throw new Exception(
\"The 'redirect_uri' is not an absolute URI.\");

// If the specified redirect URI has a fragment part.
if ( redirectUri.getFragment() != null )
{
throw new Exception(
\"The 'redirect_uri' has a fragment part.\");


else
{
// If the specified redirect URI is not an absolute one.
if ( redirectUri.isAbsolute() == false )
{
throw new Exception(
\"The 'redirect_uri' is not an absolute URI.\");

// If the specified redirect URI has a fragment part.
if ( redirectUri.getFragment() != null )
{
throw new Exception(
\"The 'redirect_uri' has a fragment part.\");

// For each registered redirect URI.
for (registeredRedirectUri : registeredRedirectUris )
{
// If the registered redirect URI is a full URI.
if ( registeredRedirectUri.getQuery() != null )

推荐阅读