-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00ac90b
commit 0fee888
Showing
5 changed files
with
29 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ | |
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package auth | ||
|
||
import ( | ||
"context" | ||
) | ||
|
||
type Authenticator interface { | ||
Authenticate(Credential) (Credential, error) | ||
Authenticate(context.Context, Credential) (Credential, error) | ||
} | ||
|
||
type AuthenticatorFunc func(Credential) (Credential, error) | ||
type AuthenticatorFunc func(context.Context, Credential) (Credential, error) | ||
|
||
func (a AuthenticatorFunc) Authenticate(credential Credential) (Credential, error) { | ||
return a(credential) | ||
func (a AuthenticatorFunc) Authenticate(ctx context.Context, credential Credential) (Credential, error) { | ||
return a(ctx, credential) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.