Get Password Exposure
GET
/api/v1/users/{sub}/password-exposure
const url = 'https://api.spartanauth.com/api/v1/users/example/password-exposure';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.spartanauth.com/api/v1/users/example/password-exposureReturns whether the user’s current password has been checked against the Pwned Passwords corpus. The caller must be the user or an admin of the user’s sector or the tenant root. This is not included on tokens or introspection.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” sub
required
string
“self” uses the signed-in user
Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
state
none | unchecked | unknown | clear | pwned
string
breachCount
string format: int64
checkedAt
string format: int64
Example generated
{ "state": "example", "breachCount": "example", "checkedAt": "example"}default
Section titled “default ”An unexpected error response.
Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}