OpenID Connect 是否支持參考范圍?
例如,請求openid范圍與請求范圍相同"openid"嗎?
如果是這樣,這是否意味著允許范圍包含空格?
我嘗試查看此規范,但在此問題上模棱兩可。
uj5u.com熱心網友回復:
請參閱原始 oauth2 rfc:
The value of the scope parameter is expressed as a list of space-
delimited, case-sensitive strings. The strings are defined by the
authorization server. If the value contains multiple space-delimited
strings, their order does not matter, and each string adds an
additional access range to the requested scope.
scope = scope-token *( SP scope-token )
scope-token = 1*( %x21 / %x23-5B / %x5D-7E )
據此,openid和"openid"是不同的范圍,并且空格分隔范圍名稱(因此不允許作為范圍名稱的一部分)。
更新
請注意,盡管在 scope-token 中,它明確省略了 %x22,即雙引號。所以"openid"不是一個有效的范圍名稱。順便說一句,它還洗掉了 %x5C,這是一個反斜杠,大概是為了使授權服務器實作中的驗證更容易。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/473339.html
上一篇:無法登錄到YouTrack
