(ctx context.Context, orgSlug, realmSlug string, params ...QueryParam)
| 258 | } |
| 259 | |
| 260 | func (s *Session) GetCredentials(ctx context.Context, orgSlug, realmSlug string, params ...QueryParam) ([]Credential, error) { |
| 261 | var creds struct { |
| 262 | Items []Credential `json:"items,omitempty"` |
| 263 | } |
| 264 | |
| 265 | u, err := getCredentialsURL(orgSlug, realmSlug) |
| 266 | if err != nil { |
| 267 | return nil, err |
| 268 | } |
| 269 | QueryParams(params).Apply(u) |
| 270 | |
| 271 | if err := s.get(ctx, u.RequestURI(), &creds); err != nil { |
| 272 | return nil, err |
| 273 | } |
| 274 | return creds.Items, nil |
| 275 | } |
| 276 | |
| 277 | func (s *Session) UserInfo(ctx context.Context) (*Root, error) { |
| 278 | if s.userInfo != nil { |
no test coverage detected