/* © SRSoftware 2025 */
package de.srsoftware.umbrella.core.model;

import de.srsoftware.tools.SessionToken;
import java.time.Instant;

/* © SRSoftware 2025 */
public record Session(UmbrellaUser user, Token token, Instant expiration) {
	public Session extended(Instant newExpiration) {
		return new Session(user,token,newExpiration);
	}

	public SessionToken cookie() {
		return new SessionToken(token.toString(),"/",expiration,true);
	}
}
