Class ServerAuthorizationCodeGrant
- java.lang.Object
-
- org.apache.cxf.rs.security.oauth2.grants.code.AuthorizationCodeGrant
-
- org.apache.cxf.rs.security.oauth2.grants.code.ServerAuthorizationCodeGrant
-
- All Implemented Interfaces:
Serializable,AccessTokenGrant
@Entity public class ServerAuthorizationCodeGrant extends AuthorizationCodeGrant
The Authorization Code Grant representation visible to the server- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ServerAuthorizationCodeGrant()ServerAuthorizationCodeGrant(Client client, long lifetime)ServerAuthorizationCodeGrant(Client client, String code, long expiresIn, long issuedAt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getApprovedScopes()Gets the scopes explicitly approved by the end userStringgetAudience()ClientgetClient()Returns the reference toClientStringgetClientCodeChallenge()StringgetClientCodeChallengeMethod()longgetExpiresIn()Returns the number of seconds this grant can be valid after it was issuedMap<String,String>getExtraProperties()longgetIssuedAt()Returns the time (in seconds) this grant was issued atStringgetNonce()List<String>getRequestedScopes()StringgetResponseType()UserSubjectgetSubject()Gets the user subject representing the end userbooleanisPreauthorizedTokenAvailable()voidsetApprovedScopes(List<String> scopes)Sets the scopes explicitly approved by the end user.voidsetAudience(String audience)voidsetClient(Client c)voidsetClientCodeChallenge(String clientCodeChallenge)voidsetClientCodeChallengeMethod(String clientCodeChallengeMethod)voidsetExpiresIn(long expiresIn)voidsetExtraProperties(Map<String,String> extraProperties)voidsetIssuedAt(long issuedAt)voidsetNonce(String nonce)voidsetPreauthorizedTokenAvailable(boolean preauthorizedTokenAvailable)voidsetRequestedScopes(List<String> requestedScopes)voidsetResponseType(String responseType)voidsetSubject(UserSubject subject)Sets the user subject representing the end user-
Methods inherited from class org.apache.cxf.rs.security.oauth2.grants.code.AuthorizationCodeGrant
getCode, getCodeVerifier, getRedirectUri, getType, setCode, setCodeVerifier, setRedirectUri, toMap
-
-
-
-
Constructor Detail
-
ServerAuthorizationCodeGrant
public ServerAuthorizationCodeGrant()
-
ServerAuthorizationCodeGrant
public ServerAuthorizationCodeGrant(Client client, long lifetime)
-
-
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)
-
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)
-
setClient
public void setClient(Client c)
-
getApprovedScopes
public List<String> getApprovedScopes()
Gets the scopes explicitly approved by the end user- Returns:
- the approved scopes
-
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:
scopes- the approved scopes
-
getSubject
public UserSubject getSubject()
Gets the user subject representing the end user- Returns:
- the subject
-
setSubject
public void setSubject(UserSubject subject)
Sets the user subject representing the end user- Parameters:
subject- the subject
-
getAudience
public String getAudience()
-
setAudience
public void setAudience(String audience)
-
getClientCodeChallenge
public String getClientCodeChallenge()
-
setClientCodeChallenge
public void setClientCodeChallenge(String clientCodeChallenge)
-
getNonce
public String getNonce()
-
setNonce
public void setNonce(String nonce)
-
isPreauthorizedTokenAvailable
public boolean isPreauthorizedTokenAvailable()
-
setPreauthorizedTokenAvailable
public void setPreauthorizedTokenAvailable(boolean preauthorizedTokenAvailable)
-
getResponseType
public String getResponseType()
-
setResponseType
public void setResponseType(String responseType)
-
getClientCodeChallengeMethod
public String getClientCodeChallengeMethod()
-
setClientCodeChallengeMethod
public void setClientCodeChallengeMethod(String clientCodeChallengeMethod)
-
-