diff options
Diffstat (limited to 'sd_login/type_session.go')
-rw-r--r-- | sd_login/type_session.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sd_login/type_session.go b/sd_login/type_session.go index 47856de..e692426 100644 --- a/sd_login/type_session.go +++ b/sd_login/type_session.go @@ -1,4 +1,4 @@ -// Copyright (C) 2016 Luke Shumaker <lukeshu@sbcglobal.net> +// Copyright (C) 2016-2017 Luke Shumaker <lukeshu@sbcglobal.net> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,15 @@ package sd_login type Session string +type AnnotatedSession struct { + Session + User User +} + +func (sess AnnotatedSession) GetUser() (User, error) { + return sess.User, nil +} + type SessionState int const ( |