mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-10 11:49:05 +02:00
fix: only return minimal client metadata for public interaction endpoint
This commit is contained in:
@@ -14,12 +14,20 @@ const (
|
||||
)
|
||||
|
||||
type interactionSessionForUser struct {
|
||||
ID string `json:"id"`
|
||||
Scopes []string `json:"scopes"`
|
||||
ScopeInfo []dto.ScopeInfoDto `json:"scopeInfo"`
|
||||
Client dto.OidcClientMetaDataDto `json:"client"`
|
||||
CurrentStep interactionStep `json:"currentStep,omitempty"`
|
||||
RequiredSteps []interactionStep `json:"requiredSteps"`
|
||||
ID string `json:"id"`
|
||||
Scopes []string `json:"scopes"`
|
||||
ScopeInfo []dto.ScopeInfoDto `json:"scopeInfo"`
|
||||
Client interactionClient `json:"client"`
|
||||
CurrentStep interactionStep `json:"currentStep,omitempty"`
|
||||
RequiredSteps []interactionStep `json:"requiredSteps"`
|
||||
}
|
||||
|
||||
type interactionClient struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
HasLogo bool `json:"hasLogo"`
|
||||
HasDarkLogo bool `json:"hasDarkLogo"`
|
||||
ClientType string `json:"clientType"`
|
||||
}
|
||||
|
||||
type completeInteractionRequest struct {
|
||||
@@ -32,7 +40,7 @@ type completeInteractionResponse struct {
|
||||
}
|
||||
|
||||
func newInteractionSessionForUser(interactionSession InteractionSession) (interactionSessionForUser, error) {
|
||||
var client dto.OidcClientMetaDataDto
|
||||
var client interactionClient
|
||||
if err := dto.MapStruct(interactionSession.Client, &client); err != nil {
|
||||
return interactionSessionForUser{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user