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(Client client, long lifetime)
           
ServerAuthorizationCodeGrant(Client client, String code, long lifetime, 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
 long getIssuedAt()
          Returns the time (in seconds) this grant was issued at
 long getLifetime()
          Returns the number of seconds this grant can be valid after it was issued
 UserSubject getSubject()
          Gets the user subject representing the end user
 String getTempClientSecretHash()
           
 void setApprovedScopes(List<String> scopes)
          Sets the scopes explicitly approved by the end user.
 void setAudience(String audience)
           
 void setSubject(UserSubject subject)
          Sets the user subject representing the end user
 void setTempClientSecretHash(String tempClientSecretHash)
           
 
Methods inherited from class org.apache.cxf.rs.security.oauth2.grants.code.AuthorizationCodeGrant
getCode, getRedirectUri, getType, 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(Client client,
                                    long lifetime)

ServerAuthorizationCodeGrant

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

getIssuedAt

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

Returns:
the seconds

getLifetime

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

Returns:
the seconds this grant will be valid for

getClient

public Client getClient()
Returns the reference to Client

Returns:
the client

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)

getTempClientSecretHash

public String getTempClientSecretHash()

setTempClientSecretHash

public void setTempClientSecretHash(String tempClientSecretHash)

Apache CXF API

Apache CXF