- 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.
28 lines
858 B
Go
28 lines
858 B
Go
package oauth
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/yaoapp/yao/openapi/oauth/types"
|
|
)
|
|
|
|
// JWKS returns the JSON Web Key Set for token verification
|
|
// This endpoint provides public keys for validating JWT tokens
|
|
func (s *Service) JWKS(ctx context.Context) (*types.JWKSResponse, error) {
|
|
// TODO: Implement JWKS endpoint
|
|
return nil, nil
|
|
}
|
|
|
|
// Endpoints returns a map of all available OAuth endpoints
|
|
// This provides endpoint discovery for clients
|
|
func (s *Service) Endpoints(ctx context.Context) (map[string]string, error) {
|
|
// TODO: Implement endpoint discovery
|
|
return nil, nil
|
|
}
|
|
|
|
// GetServerMetadata returns OAuth 2.0 Authorization Server Metadata
|
|
// This implements RFC 8414 for server discovery
|
|
func (s *Service) GetServerMetadata(ctx context.Context) (*types.AuthorizationServerMetadata, error) {
|
|
// TODO: Implement server metadata
|
|
return nil, nil
|
|
}
|