diff options
Diffstat (limited to 'app/plugin/api.go')
-rw-r--r-- | app/plugin/api.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/plugin/api.go b/app/plugin/api.go index 41838b818..4604bf8ce 100644 --- a/app/plugin/api.go +++ b/app/plugin/api.go @@ -32,6 +32,14 @@ type API interface { // Creates a post CreatePost(post *model.Post) (*model.Post, *model.AppError) + // Get LDAP attributes for a user + GetLdapUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError) + + // Temporary for built-in plugins, copied from api4/context.go ServeHTTP function. + // If a request has a valid token for an active session, the session is returned otherwise + // it errors. + GetSessionFromRequest(r *http.Request) (*model.Session, *model.AppError) + // Returns a localized string. If a request is given, its headers will be used to pick a locale. I18n(id string, r *http.Request) string } |