1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-21 23:00:50 +03:00

Make the last activity timestamp and IP available through the API

This commit is contained in:
Quentin Gliech
2023-09-19 19:25:58 +02:00
parent b85655b944
commit 50558a7319
17 changed files with 2562 additions and 2329 deletions

View File

@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::net::IpAddr;
use chrono::{DateTime, Utc};
use oauth2_types::scope::Scope;
use serde::Serialize;
@@ -73,6 +74,8 @@ pub struct Session {
pub user_session_id: Option<Ulid>,
pub client_id: Ulid,
pub scope: Scope,
pub last_active_at: Option<DateTime<Utc>>,
pub last_active_ip: Option<IpAddr>,
}
impl std::ops::Deref for Session {