org.surfnet.oaaas.model
Class AccessToken

java.lang.Object
  extended by org.surfnet.oaaas.model.AbstractEntity
      extended by org.surfnet.oaaas.model.AccessToken
All Implemented Interfaces:
Serializable

@Entity
public class AccessToken
extends AbstractEntity

Representation of an AccessToken

See Also:
Serialized Form

Constructor Summary
AccessToken()
           
AccessToken(String token, AuthenticatedPrincipal principal, Client client, long expires, List<String> scopes)
           
AccessToken(String token, AuthenticatedPrincipal principal, Client client, long expires, List<String> scopes, String refreshToken)
           
 
Method Summary
 void decodePrincipal()
           
 void encodePrincipal()
           
 Client getClient()
           
 String getClientId()
           
 String getEncodedPrincipal()
           
 long getExpires()
           
 AuthenticatedPrincipal getPrincipal()
           
 String getRefreshToken()
           
 String getResourceOwnerId()
           
 List<String> getScopes()
           
 String getToken()
           
 void setClient(Client client)
           
 void setExpires(long expires)
           
 void setRefreshToken(String refreshToken)
           
 void setScopes(List<String> scopes)
           
 void setToken(String token)
           
 
Methods inherited from class org.surfnet.oaaas.model.AbstractEntity
equals, getCreationDate, getId, getModificationDate, hashCode, setId, toString, updateTimeStamps, validate, violation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccessToken

public AccessToken()

AccessToken

public AccessToken(String token,
                   AuthenticatedPrincipal principal,
                   Client client,
                   long expires,
                   List<String> scopes)

AccessToken

public AccessToken(String token,
                   AuthenticatedPrincipal principal,
                   Client client,
                   long expires,
                   List<String> scopes,
                   String refreshToken)
Method Detail

encodePrincipal

public void encodePrincipal()

decodePrincipal

public void decodePrincipal()

getToken

public String getToken()
Returns:
the token

setToken

public void setToken(String token)
Parameters:
token - the token to set

getClient

public Client getClient()
Returns:
the client

setClient

public void setClient(Client client)
Parameters:
client - the client to set

getExpires

public long getExpires()
Returns:
the expires

setExpires

public void setExpires(long expires)
Parameters:
expires - the expires to set

getScopes

public List<String> getScopes()
Returns:
the scopes

setScopes

public void setScopes(List<String> scopes)
Parameters:
scopes - the scopes to set

getPrincipal

public AuthenticatedPrincipal getPrincipal()
Returns:
the principal

getEncodedPrincipal

public String getEncodedPrincipal()
Returns:
the encodedPrincipal

getRefreshToken

public String getRefreshToken()
Returns:
the refreshToken

setRefreshToken

public void setRefreshToken(String refreshToken)
Parameters:
refreshToken - the refreshToken to set

getResourceOwnerId

public String getResourceOwnerId()
Returns:
the resourceOwnerId

getClientId

public String getClientId()


Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.