Implement OAuth2 service provider functionality.
Этот коммит содержится в:
@@ -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
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user