Skip to content

Question: about the design of ClientInfo interface #758

Open
@yangtuooc

Description

@yangtuooc

I have a question about the design of the ClientInfo interface, specifically about the GetUserID() method:

type ClientInfo interface {
GetID() string
GetSecret() string
GetDomain() string
IsPublic() bool
GetUserID() string // <-- This method
}

According to OAuth2 specification, a Client typically represents a third-party application. However, the GetUserID() method in the interface seems to suggest a one-to-one relationship between a Client and a User.

Questions:

  1. What's the intended use case for GetUserID()?
  2. How should this be used in scenarios where one Client serves multiple users?

I'm trying to understand the design rationale to better implement this interface in my application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions