diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-09-16 15:49:12 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-09-16 15:49:12 -0400 |
commit | 47e6a33a4505e13ba4edf37ff1f8fbdadb279ee3 (patch) | |
tree | 9d798d908b3a76d6e228f39872e74cccfc27ad35 /store/store.go | |
parent | 7e418714bce067172e527359f391943459b3bd48 (diff) | |
download | chat-47e6a33a4505e13ba4edf37ff1f8fbdadb279ee3.tar.gz chat-47e6a33a4505e13ba4edf37ff1f8fbdadb279ee3.tar.bz2 chat-47e6a33a4505e13ba4edf37ff1f8fbdadb279ee3.zip |
Implement OAuth2 service provider functionality.
Diffstat (limited to 'store/store.go')
-rw-r--r-- | store/store.go | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/store/store.go b/store/store.go index 959e93fa4..0218bc757 100644 --- a/store/store.go +++ b/store/store.go @@ -34,6 +34,7 @@ type Store interface { User() UserStore Audit() AuditStore Session() SessionStore + OAuth() OAuthStore Close() } @@ -104,9 +105,9 @@ type UserStore interface { type SessionStore interface { Save(session *model.Session) StoreChannel - Get(id string) StoreChannel + Get(sessionIdOrToken string) StoreChannel GetSessions(userId string) StoreChannel - Remove(sessionIdOrAlt string) StoreChannel + Remove(sessionIdOrToken string) StoreChannel UpdateLastActivityAt(sessionId string, time int64) StoreChannel UpdateRoles(userId string, roles string) StoreChannel } @@ -115,3 +116,17 @@ type AuditStore interface { Save(audit *model.Audit) StoreChannel Get(user_id string, limit int) StoreChannel } + +type OAuthStore interface { + SaveApp(app *model.OAuthApp) StoreChannel + UpdateApp(app *model.OAuthApp) StoreChannel + GetApp(id string) StoreChannel + GetAppByUser(userId string) StoreChannel + SaveAuthData(authData *model.AuthData) StoreChannel + GetAuthData(code string) StoreChannel + RemoveAuthData(code string) StoreChannel + SaveAccessData(accessData *model.AccessData) StoreChannel + GetAccessData(token string) StoreChannel + GetAccessDataByAuthCode(authCode string) StoreChannel + RemoveAccessData(token string) StoreChannel +} |