Authentication context and methods
A recent sign-in isn't always enough: some actions need to know how someone signed in. The acr claim names a level of sign-in the provider has defined, the amr claim lists the methods used, and a relying partyAn application that accepts and relies on a sign-in from another service, the name used in OpenID Connect and for passkeys. SAML calls the same role a service provider. can ask for a level and must check what it got.
Naming the strength of a sign-in
All domains, identifiers and tokens in these examples are fictional.
Ava Archer signs in to the collage app with her photo service account. The collage app is a relying party of the photo service, whose issuerThe party that creates and signs a token, assertion, or certificate, named in a token's iss claim. A recipient must check that the issuer is exactly the one it expected and trusts. is https://auth.photos.example, and it is registered there as photo-collage. Session age and reauthentication let it ask how recently Ava signed in. Now it needs to know how.
The collage app keeps copies of Ava's photos while she works on a collage, so it wants every sign-in to use two kinds of factor. Making a collage public is riskier still: once the photos are on a public page, anyone can copy them. For that one action, the collage app wants a sign-in that a look-alike page couldn't have collected, which means a passkeyA credential that your phone, computer or password manager creates for one website and keeps for you, unlocked with a fingerprint, face or PIN. Nothing you could type is sent, and it works only for the site it was made for, which helps it resist phishing.. What makes authentication multi-factor? showed why a password and an app code are multi-factor without being phishing-resistantA property of an authentication method that binds sign-in to the real service, so evidence entered on a look-alike site cannot be passed on and used. Passkeys have it; passwords and one-time codes do not., and why a passkey unlocked by a fingerprint or PIN is both.
Authentication policy and SSO introduced the two ID tokenIn OpenID Connect, a signed JWT from the provider, addressed to one client, saying which account authenticated, when, and in answer to which request. It reports a sign-in and is not used to call APIs. claims that carry this, acr and amr. acr stands for authenticationChecking evidence that someone, or some application, controls an account, such as a password or a passkey. It establishes which account is being used, not what that account may do. context class reference. Its value names a class of authentication: a set of rules the sign-in met, defined by whoever runs the provider. The photo service defines two classes and publishes what they mean to the applications that rely on it:
| Value | Meaning at the photo service |
|---|---|
urn:photos:acr:two-factor | Two different kinds of factor, such as a password and a code from an enrolled authenticator app. |
urn:photos:acr:passkey | A passkey or security key with user verification, such as a PIN or fingerprint. A sign-in in this class also meets the rules for urn:photos:acr:two-factor. |
Each value is a case-sensitive string. OpenID ConnectAn identity layer on top of OAuth 2.0 that lets an application sign people in with an account at another service. It adds the ID token, standard claims, and discovery to the OAuth exchange. recommends an absolute URI, like these, or a name from a public registry of assurance profiles, such as the NIST levels that Authenticator assurance levels described. The string itself means nothing to the protocolAn agreed set of rules for the messages two systems exchange and what each message means. HTTP, OAuth 2.0, OpenID Connect and SAML are all protocols.. Its meaning comes from the photo service's definition, so the collage app's developers read that definition rather than trusting the name. A value containing a reassuring word such as "strong" says only what its publisher decided it says.
A class names an outcome, not a procedure. The photo service decides which methods satisfy urn:photos:acr:passkey. If it later accepts a new kind of security keyA small physical device, plugged in or held near a phone or computer, that holds credentials and uses them to prove you have it. It is an authenticator that resists phishing., the collage app doesn't change: it asks for the same class and receives the same value.
The two values aren't points on a scale either, so the collage app can't compare them as larger or smaller. It keeps its own list of the values it accepts for each action. Ordinary pages accept either value, and publishing a collage accepts only the passkey class. That list follows the photo service's definitions, which say a passkey sign-in also meets the two-factor rules.
Requesting a context
The photo service lists the classes it supports in its discovery documentA JSON document that an OpenID Provider publishes at a well-known address under its issuer, listing its endpoints, where to find its signing keys, and its supported features so clients can configure themselves from one value.. This excerpt shows the fields that matter here:
{
"issuer": "https://auth.photos.example",
"authorization_endpoint": "https://auth.photos.example/authorize",
"acr_values_supported": [
"urn:photos:acr:two-factor",
"urn:photos:acr:passkey"
],
"claims_parameter_supported": true
}acr_values_supported names the classes, not their meanings. Those still come from the photo service's documentation.
The simplest way to ask for a class is the acr_values parameter: a space-separated list in order of preference, added to the authentication request.
&acr_values=urn%3Aphotos%3Aacr%3ApasskeyThis asks the photo service to use that class and to report the class it achieved in the acr claim. It is a request for a voluntary claim. If the provider can't satisfy it, for example because Ava has no passkey, it may still complete the sign-in and report the class her sign-in did meet, such as urn:photos:acr:two-factor, or leave the claim out. The only thing the specification asks of a provider here is that the parameter doesn't cause an error. A response to acr_values therefore always needs checking.
The stricter form uses the claims parameter from Scopes and the claims parameter, marking acr as essential for the ID tokenA piece of data issued by a trusted service that a client presents as a credential, for example to call an API or to report a sign-in. Some tokens carry readable claims; others are random strings that only the issuer can interpret. and listing the acceptable values:
{
"id_token": {
"acr": {
"essential": true,
"values": ["urn:photos:acr:passkey"]
}
}
}Sent URL-encoded as the claims parameter, this asks for more than a preference. A provider that supports the claims parameter, as the photo service says it does, must return an acr that matches one of the listed values, and it may ask Ava for another factor to get there. If it can't meet the requirement, it must treat the attempt as a failed authentication instead of returning a weaker sign-in, and the collage app receives the error unmet_authentication_requirements at its redirect URI. Requesting stronger authentication follows what the relying party does next.
Use one form or the other, not both. The specification leaves the outcome undefined when a request carries acr_values together with an acr claim request that lists specific values.
A registration can supply a default as well. The collage app could be registered with default_acr_values set to ["urn:photos:acr:two-factor"], so every ordinary sign-in asks for that class without the app adding a parameter. A request in either form overrides the default, and like acr_values, the default asks for a voluntary claim.
Whichever form the request took, the collage app compares the acr in the validated ID token with its list for the action. A missing acr meets no requirement. The photo service may say that it expects two factors from everyone, but a token without the claim is no evidence that this sign-in used them, so the collage app treats it as a sign-in that fell short.
Reading amr
At 08:30 UTC on 3 October, Ava signed in with her password and a code from her authenticator appSomething a person controls and uses to prove control of an account, such as a memorized password, an app that generates one-time codes, or a security key. It counts only after it has been registered to that account.. The collage app's ID token from that sign-in reads:
{
"iss": "https://auth.photos.example",
"sub": "user-2048",
"aud": "photo-collage",
"iat": 1791016205,
"exp": 1791016505,
"auth_time": 1791016200,
"nonce": "demo-collage-nonce-1",
"acr": "urn:photos:acr:two-factor",
"amr": ["pwd", "otp", "mfa"]
}Read amr, the authentication methods references, as the list of methods a sign-in used: pwd and otp name the password and the one-time code, and mfa says the provider counted them as more than one kind of factor. RFC 8176 registers these and other common values so that providers can use the same names:
| Value | Method |
|---|---|
pwd | A password. |
otp | A one-time password, such as a code from an authenticator app. |
sms | A confirmation sent by text message to a registered number. |
pop | Proof of possession of a key. |
hwk and swk | Proof of possession of a hardware-secured or a software-secured key. |
pin | A PIN or pattern entered to unlock a key on the device. |
fpt and face | A fingerprint or face match. |
user | A test that a person is present and interacting with the device. |
mfa | More than one factor. The specific methods may be listed alongside it. |
The collage app stores the list with Ava's session and shows it in her sign-in history as "password and one-time code", which also helps support staff when she asks why publishing was refused.
One factor
- amr
- pwd
- acr
- Missing
- Ordinary pages
- Refused
- Publish a collage
- Refused
May not publish
Two kinds of factor
- amr
- pwd otp mfa
- acr
- two-factor
- Ordinary pages
- Accepted
- Publish a collage
- Refused
May not publish
Unlocked by her fingerprint
- amr
- pop mfa
- acr
- passkey
- Ordinary pages
- Accepted
- Publish a collage
- Accepted
May publish
A missing acr meets no requirement.
A passkey sign-in shows why the list needs care. RFC 8176 has no value for a passkey, so a provider describes one with the values the registry does have, and providers don't all choose the same ones. One reports pop for the key and mfa because user verification made it two factors. Another reports hwk for a security key that keeps its private key in hardware, or swk for a synced passkey, with pin, fpt or face for the unlocking step, or user when it knows only that someone was present.
Even those values are only as good as what the provider knows. A passkey's backup flags say whether it can be or has been copied to other devices, which isn't the same as saying where its key is protected, so a provider may have no reliable way to choose between hwk and swk. The user verification flag says that the person was verified, not whether a PIN or a fingerprint did it. A careful provider reports only what it can justify, and some use a method value of their own, which their documentation should define.
That is why publishing a collage rests on acr. The photo service's class definition already says which methods count, and the collage app's list for the action names the classes it accepts. Looking for hwk in the method list would tie the collage app to one provider's reporting habits, and no amr value says that a method resisted phishing. Whether Ava may publish these particular photos is a separate check of her permission.
A missing method claim proves nothing either. It isn't proof of MFA, and it isn't proof of a single factor: the provider may simply not report methods. The list also reveals how a person signs in, so the collage app keeps it with the session and the sign-in history rather than copying it into ordinary logs.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Define authentication levels and read acr beside amrWith an authenticator app and a passkey, define two levels, read acr and amr after each kind of sign-in, ask for a level with acr_values and as an essential claim, and treat a missing acr as falling short.