@@ -193,6 +193,18 @@ type UserEnrollment struct {
193
193
Type * string `json:"type,omitempty"`
194
194
}
195
195
196
+ // UserAuthenticator contains information about an Authenticator
197
+ type UserAuthenticator struct {
198
+ // ID of this authenticator.
199
+ ID * string `json:"id,omitempty"`
200
+ // Type of authenticator
201
+ Type * string `json:"type,omitempty"`
202
+ // Status of the enrollment for this authenticator
203
+ Confirmed * bool `json:"confirmed,omitempty"`
204
+ // Start date and time of this enrollment.
205
+ CreatedAt * time.Time `json:"created_at,omitempty"`
206
+ }
207
+
196
208
// UserManager manages Auth0 User resources.
197
209
type UserManager struct {
198
210
* Management
@@ -385,3 +397,11 @@ func (m *UserManager) ListEnrollments(id string) (enrols []*UserEnrollment, err
385
397
err = m .get (m .uri ("users" , id , "enrollments" ), & enrols )
386
398
return enrols , err
387
399
}
400
+
401
+ // ListAuthenticators retrieves all authenticators for a user.
402
+ //
403
+ // It's an undocumented API ¯\_(ツ)_/¯
404
+ func (m * UserManager ) ListAuthenticators (id string ) (enrols []* UserAuthenticator , err error ) {
405
+ err = m .get (m .uri ("users" , id , "authenticators" ), & enrols )
406
+ return enrols , err
407
+ }
0 commit comments