Apache CXF API

org.apache.cxf.rs.security.oauth2.grants.code
Class ServerAuthorizationCodeGrant

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.grants.code.AuthorizationCodeGrant
      extended by org.apache.cxf.rs.security.oauth2.grants.code.ServerAuthorizationCodeGrant
All Implemented Interfaces:
Serializable, AccessTokenGrant

public class ServerAuthorizationCodeGrant
extends AuthorizationCodeGrant

The Authorization Code Grant representation visible to the server

See Also:
Serialized Form

Constructor Summary
ServerAuthorizationCodeGrant()
           
ServerAuthorizationCodeGrant(Client client, long lifetime)
           
ServerAuthorizationCodeGrant(Client client, String code, long expiresIn, long issuedAt)
           
 
Method Summary
 List<String> getApprovedScopes()
          Gets the scopes explicitly approved by the end user
 String getAudience()
           
 Client getClient()
          Returns the reference to Client
 String getClientCodeVerifier()
           
 long getExpiresIn()
          Returns the number of seconds this grant can be valid after it was issued
 long getIssuedAt()
          Returns the time (in seconds) this grant was issued at
 long getLifetime()
          Deprecated. 
 UserSubject getSubject()
          Gets the user subject representing the end user
 void setApprovedScopes(List<String> scopes)
          Sets the scopes explicitly approved by the end user.
 void setAudience(String audience)
           
 void setClient(Client c)
           
 void setClientCodeVerifier(String clientCodeVerifier)
           
 void setExpiresIn(long expiresIn)
           
 void setIssuedAt(long issuedAt)
           
 void setSubject(UserSubject subject)
          Sets the user subject representing the end user
 
Methods inherited from class org.apache.cxf.rs.security.oauth2.grants.code.AuthorizationCodeGrant
getCode, getRedirectUri, getType, setCode, setRedirectUri, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerAuthorizationCodeGrant

public ServerAuthorizationCodeGrant()

ServerAuthorizationCodeGrant

public ServerAuthorizationCodeGrant(Client client,
                                    long lifetime)

ServerAuthorizationCodeGrant

public ServerAuthorizationCodeGrant(Client client,
                                    String code,
                                    long expiresIn,
                                    long issuedAt)
Method Detail

getIssuedAt

public long getIssuedAt()
Returns the time (in seconds) this grant was issued at

Returns:
the seconds

setIssuedAt

public void setIssuedAt(long issuedAt)

getLifetime

@Deprecated
public long getLifetime()
Deprecated. 

Returns the number of seconds this grant can be valid after it was issued

Returns:
the seconds this grant will be valid for

getExpiresIn

public long getExpiresIn()
Returns the number of seconds this grant can be valid after it was issued

Returns:
the seconds this grant will be valid for

setExpiresIn

public void setExpiresIn(long expiresIn)

getClient

public Client getClient()
Returns the reference to Client

Returns:
the client

setClient

public void setClient(Client c)

setApprovedScopes

public void setApprovedScopes(List<String> scopes)
Sets the scopes explicitly approved by the end user. If this list is empty then the end user had no way to down-scope.

Parameters:
approvedScope - the approved scopes

getApprovedScopes

public List<String> getApprovedScopes()
Gets the scopes explicitly approved by the end user

Returns:
the approved scopes

setSubject

public void setSubject(UserSubject subject)
Sets the user subject representing the end user

Parameters:
subject - the subject

getSubject

public UserSubject getSubject()
Gets the user subject representing the end user

Returns:
the subject

getAudience

public String getAudience()

setAudience

public void setAudience(String audience)

getClientCodeVerifier

public String getClientCodeVerifier()

setClientCodeVerifier

public void setClientCodeVerifier(String clientCodeVerifier)

Apache CXF API

Apache CXF