1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 21:07:03 +00:00

Complete the OAuth/OAuth2 'high level' support

This commit is contained in:
Makis Maropoulos
2016-06-22 16:01:31 +03:00
parent 56f78567a2
commit 4a446ac1e2
8 changed files with 312 additions and 29 deletions

View File

@@ -136,8 +136,12 @@ type (
// IContextAuth handles the authentication/authorization
IContextAuth interface {
// CompleteUserAuth
// SetOAuthUser sets the oauth user
// Internal method but exported because useful for advanced use cases
// Iris uses this method to set automatically the authenticated user.
SetOAuthUser(goth.User)
// OAuthUser returns the authenticated User
// See https://github.com/iris-contrib/gothic/blob/master/example/main.go to see this in action.
CompleteUserAuth() (goth.User, error)
OAuthUser() goth.User
}
)