Skip to content

Commit

Permalink
refactor(oauth2): rename SDK method from userinfo to getOidcUserInfo
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Rename SDK method from `userinfo` to `getOidcUserInfo`.
  • Loading branch information
aeneasr committed Sep 7, 2022
1 parent df467a0 commit 4e554e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions oauth2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ type swaggerFlushInactiveAccessTokens struct {
}

// The userinfo response
// swagger:model userinfoResponse
type swaggeruserinfoResponsePayload struct {
// swagger:model oidcUserInfo
type oidcUserInfo struct {
// Subject - Identifier for the End-User at the IssuerURL.
Subject string `json:"sub"`

Expand Down
6 changes: 2 additions & 4 deletions oauth2/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ func (h *Handler) LogoutHandler(w http.ResponseWriter, r *http.Request, ps httpr
//
// Responses:
// 200: OidcConfiguration
// 401: oAuth2ApiError
// default: oAuth2ApiError
func (h *Handler) WellKnownHandler(w http.ResponseWriter, r *http.Request) {
key, err := h.r.OpenIDJWTStrategy().GetPublicKey(r.Context())
Expand Down Expand Up @@ -266,7 +265,7 @@ func (h *Handler) WellKnownHandler(w http.ResponseWriter, r *http.Request) {
})
}

// swagger:route GET /userinfo public userinfo
// swagger:route GET /userinfo v1 getOidcUserInfo
//
// OpenID Connect Userinfo
//
Expand All @@ -288,8 +287,7 @@ func (h *Handler) WellKnownHandler(w http.ResponseWriter, r *http.Request) {
// oauth2:
//
// Responses:
// 200: userinfoResponse
// 401: oAuth2ApiError
// 200: oidcUserInfo
// default: oAuth2ApiError
func (h *Handler) UserinfoHandler(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
Expand Down

0 comments on commit 4e554e7

Please sign in to comment.