yao/openapi/oauth/user.go
Max e19aa4b8df Remove deprecated OAuth interfaces and types
- Deleted the OAuth interface and related types that were previously defined in the `interfaces.go` and `types.go` files, streamlining the codebase.
- Updated the `oauth.go` file to integrate user and client providers directly, enhancing the service's functionality and reducing complexity.
- Refactored the user information retrieval method to utilize the new user provider structure, ensuring compatibility with the updated architecture.
2025-07-17 17:19:22 +08:00

18 lines
471 B
Go

package oauth
import (
"context"
)
// UserInfo returns user information for a given access token
func (s *Service) UserInfo(ctx context.Context, accessToken string) (interface{}, error) {
return s.userProvider.GetUserByAccessToken(ctx, accessToken)
}
// Additional user-related helper methods can be added here as needed
// For example:
// - User profile management
// - User consent handling
// - User authentication verification
// - User scope validation
// etc.