Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

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 party 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 issuer 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 passkey. What makes authentication multi-factor? showed why a password and an app code are multi-factor without being phishing-resistant, and why a passkey unlocked by a fingerprint or PIN is both.

Authentication policy and SSO introduced the two ID token claims that carry this, acr and amr. acr stands for authentication 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:

The photo service's authentication classes
ValueMeaning at the photo service
urn:photos:acr:two-factorTwo different kinds of factor, such as a password and a code from an enrolled authenticator app.
urn:photos:acr:passkeyA 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 Connect 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 protocol. 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 key, 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 document. 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%3Apasskey

This 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 token 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 app. 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:

Some registered amr values (RFC 8176)
ValueMethod
pwdA password.
otpA one-time password, such as a code from an authenticator app.
smsA confirmation sent by text message to a registered number.
popProof of possession of a key.
hwk and swkProof of possession of a hardware-secured or a software-secured key.
pinA PIN or pattern entered to unlock a key on the device.
fpt and faceA fingerprint or face match.
userA test that a person is present and interacting with the device.
mfaMore 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.

Three of Ava's sign-ins: amr lists what she used, acr names the level met, and only acr decides what the collage app allows.

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.

The photo service says it expects two factors from everyone. An ID token reaches the collage app with no acr claim. Does it meet a page that requires urn:photos:acr:two-factor? 1 of 3

Choose one answer.

Why does the collage app decide whether Ava may publish a collage from acr rather than by looking for hwk in amr? 2 of 3

Choose one answer.

The collage app sends acr_values=urn:photos:acr:passkey for Ava, who has no passkey. What can the photo service do? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity