AccessToken.java revision 77a123fe3fd0188a9552995da5a36a9f70b0d36f
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014 ForgeRock AS.
*/
/**
* Models a OAuth2 access token.
*
* @since 12.0.0
*/
/**
* Constructs a new AccessToken backed with the data in the specified JsonValue.
*
* @param token The JsonValue of the token.
* @throws InvalidGrantException If the given token is not an Access Token.
*/
super(token);
}
}
/**
* Constructs a new AccessToken.
*
* @param id The token id.
* @param authorizationCode The authorization code.
* @param resourceOwnerId The resource owner's id.
* @param clientId The client's id.
* @param redirectUri The redirect uri.
* @param scope The scope.
* @param expiryTime The expiry time.
* @param refreshTokenId The refresh token id.
* @param tokenName The token name.
* @param grantType The grant type.
* @param nonce The nonce.
*/
public AccessToken(String id, String authorizationCode, String resourceOwnerId, String clientId, String redirectUri,
}
setTokenType("Bearer");
}
/**
* Sets the token id.
*
* @param id The token id.
*/
}
/**
* Sets the authorization code.
*
* @param authorizationCode The authorization code.
*/
}
/**
* Sets the resource owner's id.
*
* @param resourceOwnerId The resource owner's id.
*/
}
/**
* Sets the client's id.
*
* @param clientId The client's id.
*/
}
/**
* Sets the redirect uri.
*
* @param redirectUri The redirect uri.
*/
}
/**
* Sets the scope.
*
* @param scope The scope.
*/
}
/**
* Sets the expiry time.
*
* @param expiryTime The expiry time.
*/
protected void setExpiryTime(long expiryTime) {
}
/**
* Sets the refresh token id.
*
* @param refreshTokenId The refresh token id.
*/
}
/**
* Sets the token type.
*
* @param tokenType The token type.
*/
}
/**
* Sets the token name.
*
* @param tokenName The token name.
*/
}
/**
* Sets the grant type.
*
* @param grantType The grant type.
*/
}
/**
* Sets the nonce.
*
* @param nonce The nonce.
*/
}
/**
* Gets the scope.
*
* @return The scope.
*/
return scope;
}
return Collections.emptySet();
}
/**
* Gets the client's id.
*
* @return The client's id.
*/
public String getClientId() {
}
return null;
}
/**
* Gets the nonce.
*
* @return The nonce.
*/
}
return null;
}
/**
* Gets the resource owner's id.
*
* @return The resource owner's id.
*/
public String getResourceOwnerId() {
}
return null;
}
/**
* {@inheritDoc}
*/
public String getTokenId() {
}
return null;
}
/**
* {@inheritDoc}
*/
public String getTokenName() {
}
return null;
}
/**
* Determines if the Access Token is expired.
*
* @return {@code true} if current time is greater than the expiry time.
*/
public final boolean isExpired() {
}
/**
* Gets the expiry time.
*
* @return The Expiry time.
*/
public long getExpiryTime() {
}
return 0;
}
/**
* Gets the token type.
*
* @return The token type.
*/
public String getTokenType() {
}
return null;
}
/**
* Gets the grant type.
*
* @return The grant type.
*/
public String getGrantType() {
}
return null;
}
/**
* Gets the display String for the given String.
*
* @param s The String.
* @return The display String.
*/
return s;
}
/**
* {@inheritDoc}
*/
return tokenMap;
}
/**
* {@inheritDoc}
*/
return tokenInfo;
}
/**
* Adds additional data to the Access Token.
*
* @param key The key.
* @param value The value.
*/
}
}
}