Skip to content

Commit

Permalink
Add getAuthenticators method
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenclouston committed Nov 29, 2024
1 parent 630982d commit 1806660
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/Authsignal/Authsignal.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,21 @@ public static function updateAction(array $params)
return $response;
}

/**
* Get Authenticators
* @param array $params An associative array of parameters:
* - string 'userId': The userId of the user whose authenticators you want to retrieve
* @return array The list of user authenticators
* @throws AuthsignalApiException if the request fails
*/
public static function getAuthenticators(array $params)
{
$request = new AuthsignalClient();
$userId = urlencode($params['userId']);
$path = "/users/{$userId}/authenticators";

list($response, $request) = $request->send($path, null, 'get');
return $response;
}

}

0 comments on commit 1806660

Please sign in to comment.