use of com.authlete.jaxrs.server.obb.model.CreateConsentData in project java-oauth-server by authlete.
the class ConsentDao method create.
public Consent create(CreateConsent createConsent, long clientId) {
CreateConsentData data = createConsent.getData();
String consentId = generateConsentId();
String now = ObbUtils.formatNow();
Consent consent = new Consent().setConsentId(consentId).setPermissions(data.getPermissions()).setStatus("AWAITING_AUTHORISATION").setCreationDateTime(now).setExpirationDateTime(data.getExpirationDateTime()).setStatusUpdateDateTime(now).setClientId(clientId);
getStore().put(consentId, consent);
return consent;
}
Aggregations