Implement Session Endpoints #20

Merged
Quaternions merged 7 commits from roles into staging 2025-03-26 00:58:49 +00:00
Showing only changes of commit 1feca92f7d - Show all commits

@ -74,6 +74,15 @@ func (usr UserInfoHandle) GetUserID() (uint64, error) {
}
return session.UserID, nil
}
func (usr UserInfoHandle) Validate() (bool, error) {
validate, err := usr.svc.Client.ValidateSession(*usr.ctx, &auth.IdMessage{
SessionID: usr.sessionId,
})
if err != nil {
return false, err
}
return validate.Valid, nil
}
func (usr UserInfoHandle) IsSubmitter(submitter uint64) (bool, error) {
userId, err := usr.GetUserID()
if err != nil {