I assume you mean OpenID Connect, since OAuth2.0 is not used for authentication and does not require the use of JWTs.
(我假设您的意思是OpenID Connect,因为OAuth2.0不用于身份验证,并且不需要使用JWT。)
Also, in your scenario there are not multiple resources, but multiple clients / relying parties. (另外,在您的方案中,没有多个资源,但是有多个客户/依赖方。)
Using the OpendID Connect Implicit flow, the issuer will eventually send an id token (JWT) to the user's browser.
(使用OpendID Connect Implicit流,发行者最终将向用户的浏览器发送ID令牌(JWT)。)
This JWT can be used to authenticate to a service. (该JWT可以用于对服务进行身份验证。)
Each JWT will contain an aud
(audience) claim to identify the service it should be used for. (每个JWT都会包含一个aud
(听众)声明,以标识其应用于的服务。)
Using the Authorization Code flow, the issuer will eventually send an authorization code to the user's browser.
(使用授权码流程,发行者最终将向用户的浏览器发送授权码。)
The user will send the code to a service, and the service will send the code plus its client id to the issuer in exchange for an id token (JWT) and an access token. (用户将代码发送给服务,服务会将代码及其客户ID发送给发行方,以换取ID令牌(JWT)和访问令牌。)
In both cases, the service identifies the end user using the iss
(issuer) claim, and verifies the JWT by checking the signature, expiry and audience.
(在这两种情况下,该服务都使用iss
(签发人)声明标识最终用户,并通过检查签名,有效期限和受众来验证JWT。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…