mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-05-31 03:03:44 +00:00
feat(auth): add authenticate callback for fallback logic
* Implement SetAuthenticateCallback in authenticators * Update Authenticate methods to use callback on failure
This commit is contained in:
@@ -39,6 +39,8 @@ func (m *mockAuth) Authenticate(r *http.Request) (*UserContext, error) {
|
||||
return m.authUser, m.authErr
|
||||
}
|
||||
|
||||
func (m *mockAuth) SetAuthenticateCallback(_ func(r *http.Request) (*UserContext, error)) {}
|
||||
|
||||
// Optional interface implementations
|
||||
func (m *mockAuth) RefreshToken(ctx context.Context, refreshToken string) (*LoginResponse, error) {
|
||||
if !m.supportsRefresh {
|
||||
|
||||
Reference in New Issue
Block a user