Skip to content

Commit

Permalink
Merge branch 'main' into release-4.4.b
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerGillson authored Aug 2, 2024
2 parents c590acd + c16c4e2 commit ca2634e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions client/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ func (h *V1Client) Authenticate(body *models.V1AuthLogin) (*models.V1UserToken,
return resp.Payload, nil
}

// AuthRefreshToken refreshes jwt token.
func (h *V1Client) AuthRefreshToken(token string) (*models.V1UserToken, error) {
params := clientv1.NewV1AuthRefreshParamsWithContext(h.ctx).WithToken(token)
resp, err := h.Client.V1AuthRefresh(params)
if err != nil {
return nil, err
}
return resp.Payload, nil
}

// GetUsersInfo retrieves the authenticated user info.
func (h *V1Client) GetUsersInfo() (*models.V1UserInfo, error) {
params := clientv1.NewV1UsersInfoGetParamsWithContext(h.ctx)
Expand Down

0 comments on commit ca2634e

Please sign in to comment.