Session
Session
A Session is created when a user makes a request to restricted API operations. A Session can be an AnonymousSession in the case of un-authenticated users, otherwise it is an AuthenticatedSession.
Signature
class Session extends VendureEntity {
@Index({ unique: true }) @Column() @Index({ unique: true })
@Column()
token: string;
@Column() @Column() expires: Date;
@Column() @Column() invalidated: boolean;
@EntityId({ nullable: true }) @EntityId({ nullable: true })
activeOrderId?: ID;
@Index() @ManyToOne(type => Order) @Index()
@ManyToOne(type => Order)
activeOrder: Order | null;
@EntityId({ nullable: true }) @EntityId({ nullable: true })
activeChannelId?: ID;
@Index() @ManyToOne(type => Channel) @Index()
@ManyToOne(type => Channel)
activeChannel: Channel | null;
}
Extends
Members
token
property
type:
string
expires
property
type:
Date
invalidated
property
type:
boolean
activeOrderId
property
type:
ID
activeOrder
property
type:
Order | null
activeChannelId
property
type:
ID
activeChannel
property
type:
Channel | null