Module EzSession.TYPES
type foreign_info
=
{
foreign_origin : string;
foreign_token : string;
}
type 'user_id session
=
{
session_token : string;
session_login : string;
session_user_id : 'user_id;
session_last : float;
session_foreign : foreign_info option;
}
module type SessionArg = sig ... end
type ('user_id, 'user_info) auth
=
{
auth_login : string;
auth_user_id : 'user_id;
auth_token : string;
auth_user_info : 'user_info;
}
type auth_needed
=
{
challenge_id : string;
challenge : string;
}
type 'auth connect_response
=
|
AuthOk of 'auth
|
AuthNeeded of auth_needed
type local_login_message
=
{
login_user : string;
login_challenge_id : string;
login_challenge_reply : string;
}
type login_message
=
|
Local of local_login_message
|
Foreign of foreign_info
type ('user_id, 'user_info) login_response
=
|
LoginOk of ('user_id, 'user_info) auth
|
LoginWait of 'user_id
type login_error
=[
|
`Bad_user_or_password
|
`User_not_registered
|
`Unverified_user
|
`Challenge_not_found_or_expired of string
|
`Invalid_session_login of string
]
type logout_error
=[
|
`Invalid_session_logout of string
]
type connect_error
=[
|
`Session_expired
|
`Invalid_session_connect of string
]