use of org.apache.cxf.rs.security.oauth.data.AccessToken in project tesb-rt-se by Talend.
the class OAuthManager method createAccessToken.
public AccessToken createAccessToken(AccessTokenRegistration reg) throws OAuthServiceException {
RequestToken rt = reg.getRequestToken();
String tokenId = UUID.randomUUID().toString();
String tokenSecret = UUID.randomUUID().toString();
at = new AccessToken(rt.getClient(), tokenId, tokenSecret);
at.setSubject(rt.getSubject());
at.setScopes(rt.getScopes());
rt = null;
return at;
}
Aggregations