org.apache.cxf.rs.security.oauth2.common
Class ClientAccessToken

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.common.AccessToken
      extended by org.apache.cxf.rs.security.oauth2.common.ClientAccessToken

public class ClientAccessToken
extends AccessToken

Represents the extended client view of AccessToken. It may contain the actual scope value assigned to the access token, the refresh token key, and other properties such as when this token will expire, etc.


Constructor Summary
ClientAccessToken(String tokenType, String tokenKey)
           
 
Method Summary
 String getApprovedScope()
          Gets the actual scope assigned to the access token.
 long getExpiresIn()
          The token lifetime
 String getRefreshToken()
          Gets the refresh token key the client can use to obtain a new access token
 void setApprovedScope(String approvedScope)
          Sets the actual scope assigned to the access token.
 void setExpiresIn(long expiresIn)
           
 void setRefreshToken(String refreshToken)
          Sets the refresh token key the client can use to obtain a new access token
 
Methods inherited from class org.apache.cxf.rs.security.oauth2.common.AccessToken
getParameters, getTokenKey, getTokenType, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientAccessToken

public ClientAccessToken(String tokenType,
                         String tokenKey)
Method Detail

setApprovedScope

public void setApprovedScope(String approvedScope)
Sets the actual scope assigned to the access token. For example, it can be down-scoped in which case the client may need to adjust the way it works with the end user.

Parameters:
approvedScope - the actual scope

getApprovedScope

public String getApprovedScope()
Gets the actual scope assigned to the access token.

Returns:
the scope

setRefreshToken

public void setRefreshToken(String refreshToken)
Sets the refresh token key the client can use to obtain a new access token

Parameters:
refreshToken - the refresh token

getRefreshToken

public String getRefreshToken()
Gets the refresh token key the client can use to obtain a new access token

Returns:
the refresh token

getExpiresIn

public long getExpiresIn()
The token lifetime

Returns:
the lifetime, -1 means no 'expires_in' parameter was returned

setExpiresIn

public void setExpiresIn(long expiresIn)


Apache CXF