- 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.
18 lines
471 B
Go
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.
|