org.springframework.security.oauth2.common.exceptions
类 OAuth2Exception

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 java.lang.RuntimeException
              继承者 org.springframework.security.oauth2.common.exceptions.OAuth2Exception
所有已实现的接口:
Serializable
直接已知子类:
ClientAuthenticationException, InsufficientScopeException, InvalidScopeException, OAuth2AccessDeniedException, UnsupportedGrantTypeException, UnsupportedResponseTypeException, UserDeniedAuthorizationException

public class OAuth2Exception
extends RuntimeException

Base exception for OAuth 2 exceptions.

作者:
Ryan Heaton, Rob Winch, Dave Syer
另请参见:
序列化表格

字段摘要
static String ACCESS_DENIED
           
static String DESCRIPTION
           
static String ERROR
           
static String INVALID_CLIENT
           
static String INVALID_GRANT
           
static String INVALID_REQUEST
           
static String INVALID_SCOPE
           
static String INVALID_TOKEN
           
static String REDIRECT_URI_MISMATCH
           
static String UNAUTHORIZED_CLIENT
           
static String UNSUPPORTED_GRANT_TYPE
           
static String UNSUPPORTED_RESPONSE_TYPE
           
static String URI
           
 
构造方法摘要
OAuth2Exception(String msg)
           
OAuth2Exception(String msg, Throwable t)
           
 
方法摘要
 void addAdditionalInformation(String key, String value)
          Add some additional information with this OAuth error.
static OAuth2Exception create(String errorCode, String errorMessage)
          Creates the appropriate subclass of OAuth2Exception given the errorCode.
 Map<String,String> getAdditionalInformation()
          Get any additional information associated with this error.
 int getHttpErrorCode()
          The HTTP error code associated with this error.
 String getOAuth2ErrorCode()
          The OAuth2 error code.
 String getSummary()
           
 String toString()
           
static OAuth2Exception valueOf(Map<String,String> errorParams)
          Creates an OAuth2Exception from a Map.
 
从类 java.lang.Throwable 继承的方法
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

ERROR

public static final String ERROR
另请参见:
常量字段值

DESCRIPTION

public static final String DESCRIPTION
另请参见:
常量字段值

URI

public static final String URI
另请参见:
常量字段值

INVALID_REQUEST

public static final String INVALID_REQUEST
另请参见:
常量字段值

INVALID_CLIENT

public static final String INVALID_CLIENT
另请参见:
常量字段值

INVALID_GRANT

public static final String INVALID_GRANT
另请参见:
常量字段值

UNAUTHORIZED_CLIENT

public static final String UNAUTHORIZED_CLIENT
另请参见:
常量字段值

UNSUPPORTED_GRANT_TYPE

public static final String UNSUPPORTED_GRANT_TYPE
另请参见:
常量字段值

INVALID_SCOPE

public static final String INVALID_SCOPE
另请参见:
常量字段值

INVALID_TOKEN

public static final String INVALID_TOKEN
另请参见:
常量字段值

REDIRECT_URI_MISMATCH

public static final String REDIRECT_URI_MISMATCH
另请参见:
常量字段值

UNSUPPORTED_RESPONSE_TYPE

public static final String UNSUPPORTED_RESPONSE_TYPE
另请参见:
常量字段值

ACCESS_DENIED

public static final String ACCESS_DENIED
另请参见:
常量字段值
构造方法详细信息

OAuth2Exception

public OAuth2Exception(String msg,
                       Throwable t)

OAuth2Exception

public OAuth2Exception(String msg)
方法详细信息

getOAuth2ErrorCode

public String getOAuth2ErrorCode()
The OAuth2 error code.

返回:
The OAuth2 error code.

getHttpErrorCode

public int getHttpErrorCode()
The HTTP error code associated with this error.

返回:
The HTTP error code associated with this error.

getAdditionalInformation

public Map<String,String> getAdditionalInformation()
Get any additional information associated with this error.

返回:
Additional information, or null if none.

addAdditionalInformation

public void addAdditionalInformation(String key,
                                     String value)
Add some additional information with this OAuth error.

参数:
key - The key.
value - The value.

create

public static OAuth2Exception create(String errorCode,
                                     String errorMessage)
Creates the appropriate subclass of OAuth2Exception given the errorCode.

参数:
errorCode -
errorMessage -
返回:

valueOf

public static OAuth2Exception valueOf(Map<String,String> errorParams)
Creates an OAuth2Exception from a Map.

参数:
errorParams -
返回:

toString

public String toString()
覆盖:
Throwable 中的 toString

getSummary

public String getSummary()
返回:
a comma-delimited list of details (key=value pairs)


Copyright © 2013. All rights reserved.