OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
738 B

package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/field"
)
// AuthSession holds the schema definition for the AuthSession entity.
type AuthSession struct {
ent.Schema
}
// Fields of the AuthSession.
func (AuthSession) Fields() []ent.Field {
return []ent.Field{
field.Text("id").
SchemaType(textSchema).
NotEmpty().
Unique(),
field.Bytes("client_states"),
field.Time("created_at").
SchemaType(timeSchema),
field.Time("last_activity").
SchemaType(timeSchema),
field.Text("ip_address").
SchemaType(textSchema).
Default(""),
field.Text("user_agent").
SchemaType(textSchema).
Default(""),
}
}
// Edges of the AuthSession.
func (AuthSession) Edges() []ent.Edge {
return []ent.Edge{}
}