لغو پیوند حساب ها، لغو پیوند حساب ها

لغو پیوند ممکن است از پلتفرم شما یا Google آغاز شود و نمایش وضعیت پیوند ثابت در هر دو بهترین تجربه کاربر را فراهم می کند. پشتیبانی از نقطه پایانی ابطال رمز یا محافظت متقابل حساب برای پیوند دادن حساب Google اختیاری است.

حساب ها می توانند با هر یک از موارد زیر لغو پیوند شوند:

  • درخواست کاربر از
    • یک برنامه Google یا تنظیمات حساب Google
    • پلت فرم شما
  • عدم تمدید یک نشانه تجدید منقضی شده
  • رویدادهای دیگری که توسط شما یا Google آغاز شده است. به عنوان مثال، تعلیق حساب توسط سرویس های سوء استفاده و شناسایی تهدید.

کاربر درخواست لغو پیوند از Google را داده است

لغو پیوند حساب که از طریق حساب یا برنامه Google کاربر آغاز می‌شود، هرگونه دسترسی صادر شده قبلی و نشانه‌های تازه‌سازی را حذف می‌کند، رضایت کاربر را حذف می‌کند و در صورت تمایل به اجرای آن، به صورت اختیاری نقطه پایان لغو رمز شما را فراخوانی می‌کند.

کاربر درخواست لغو پیوند از پلتفرم شما را داده است

شما باید مکانیزمی برای لغو پیوند کاربران ارائه دهید، مانند URL به حساب خود. اگر راهی برای لغو پیوند به کاربران ارائه نمی کنید، پیوندی به حساب Google اضافه کنید تا کاربران بتوانند حساب پیوند شده خود را مدیریت کنند.

شما می توانید انتخاب کنید که ریسک و رویداد اشتراک گذاری و همکاری (RISC) را اجرا کنید و Google را از تغییرات وضعیت پیوند دادن حساب کاربران مطلع کنید. این امکان یک تجربه کاربری بهبود یافته را فراهم می کند که در آن هم پلتفرم شما و هم Google وضعیت پیوند فعلی و ثابتی را بدون نیاز به تکیه بر درخواست رمز به روز رسانی یا دسترسی برای به روز رسانی وضعیت پیوند نشان می دهند.

انقضای توکن

برای ارائه یک تجربه کاربری روان و جلوگیری از اختلال در سرویس، Google تلاش می‌کند تا توکن‌های تازه‌سازی را در پایان عمرشان تمدید کند. در برخی از سناریوها، ممکن است رضایت کاربر برای پیوند مجدد حساب‌ها در صورت در دسترس نبودن رمز تازه‌سازی معتبر لازم باشد.

طراحی پلتفرم شما برای پشتیبانی از چندین دسترسی منقضی نشده و توکن‌های تازه‌سازی می‌تواند شرایط مسابقه موجود در مبادلات مشتری-سرور بین محیط‌های خوشه‌ای را به حداقل برساند، از اختلال کاربر جلوگیری کند و سناریوهای پیچیده زمان‌بندی و رسیدگی به خطا را به حداقل برساند. در حالی که در نهایت سازگار است، هر دو توکن منقضی نشده قبلی و تازه صادر شده ممکن است برای مدت کوتاهی در طول مبادله تمدید توکن مشتری-سرور و قبل از همگام سازی خوشه استفاده شوند. به عنوان مثال، درخواست Google به سرویس شما که از کد دسترسی منقضی نشده قبلی استفاده می‌کند، درست پس از صدور یک نشانه دسترسی جدید، اما قبل از دریافت و همگام‌سازی خوشه‌ای در Google انجام می‌شود. اقدامات امنیتی جایگزین برای Refresh Token Rotation توصیه می شود.

رویدادهای دیگر

حساب ها می توانند به دلایل مختلف دیگری مانند عدم فعالیت، تعلیق، رفتار مخرب و غیره لغو پیوند شوند. در چنین سناریوهایی، پلتفرم شما و Google می‌توانند به بهترین شکل حساب‌های کاربری را مدیریت کرده و با اطلاع رسانی به یکدیگر از تغییرات حساب و وضعیت پیوند، مجدداً پیوند دهند.

یک نقطه پایانی ابطال رمز را برای Google اجرا کنید و با استفاده از RISC از رویدادهای لغو رمز خود به Google اطلاع دهید تا مطمئن شوید که پلتفرم شما و Google وضعیت پیوند حساب کاربری ثابتی را حفظ می کنند.

نقطه پایان لغو رمز

If you support an OAuth 2.0 token revocation endpoint, your platform can receive notifications from Google. This lets you inform users of link state changes, invalidate a token, and cleanup security credentials and authorization grants.

The request has the following form:

POST /revoke HTTP/1.1
Host: oauth2.example.com
Content-Type: application/x-www-form-urlencoded

client_id=GOOGLE_CLIENT_ID&client_secret=GOOGLE_CLIENT_SECRET&token=TOKEN&token_type_hint=refresh_token

Your token revocation endpoint must be able to handle the following parameters:

Revocation endpoint parameters
client_id A string that identifies the request origin as Google. This string must be registered within your system as Google's unique identifier.
client_secret A secret string that you registered with Google for your service.
token The token to be revoked.
token_type_hint (Optional) The type of token being revoked, either an access_token or refresh_token. If unspecified, defaults to access_token.

Return a response when the token is deleted or invalid. See the following for an example:

HTTP/1.1 200 Success
Content-Type: application/json;charset=UTF-8

If the token can't be deleted for any reason, return a 503 response code, as shown in the following example:

HTTP/1.1 503 Service Unavailable
Content-Type: application/json;charset=UTF-8
Retry-After: HTTP-date / delay-seconds

Google retries the request later or as requested by Retry-After.

حفاظت از حساب های متقابل (RISC)

If you support Cross-Account Protection, your platform can notify Google when access or refresh tokens are revoked. This allows Google to inform users of link state changes, invalidate the token, cleanup security credentials, and authorization grants.

Cross-Account Protection is based on the RISC standard developed at the OpenID Foundation.

A Security Event Token is used to notify Google of token revocation.

When decoded, a token revocation event looks like the following example:

{
  "iss":"http://risc.example.com",
  "iat":1521068887,
  "aud":"google_account_linking",
  "jti":"101942095",
  "toe": "1508184602",
  "events": {
    "https://schemas.openid.net/secevent/oauth/event-type/token-revoked":{
      "subject_type": "oauth_token",
      "token_type": "refresh_token",
      "token_identifier_alg": "hash_SHA512_double",
      "token": "double SHA-512 hash value of token"
    }
  }
}

Security Event Tokens that you use to notify Google of token revocation events must conform to the requirements in the following table:

Token revocation events
iss Issuer Claim: This is a URL which you host, and it's shared with Google during registration.
aud Audience Claim: This identifies Google as the JWT recipient. It must be set to google_account_linking.
jti JWT ID Claim: This is a unique ID that you generate for every security event token.
iat Issued At Claim: This is a NumericDate value that represents the time when this security event token was created.
toe Time of Event Claim: This is an optional NumericDate value that represents the time at which the token was revoked.
exp Expiration Time Claim: Do not include this field, as the event resulting in this notification has already taken place.
events
Security Events Claim: This is a JSON object, and must include only a single token revocation event.
subject_type This must be set to oauth_token.
token_type This is the type of token being revoked, either access_token or refresh_token.
token_identifier_alg This is the algorithm used to encode the token, and it must be hash_SHA512_double.
token This is the ID of the revoked token.

For more information on field types and formats, see JSON Web Token (JWT).

،

لغو پیوند ممکن است از پلتفرم شما یا Google آغاز شود و نمایش وضعیت پیوند ثابت در هر دو بهترین تجربه کاربر را فراهم می کند. پشتیبانی از نقطه پایانی ابطال رمز یا محافظت متقابل حساب برای پیوند دادن حساب Google اختیاری است.

حساب ها می توانند با هر یک از موارد زیر لغو پیوند شوند:

  • درخواست کاربر از
    • یک برنامه Google یا تنظیمات حساب Google
    • پلت فرم شما
  • عدم تمدید یک نشانه تجدید منقضی شده
  • رویدادهای دیگری که توسط شما یا Google آغاز شده است. به عنوان مثال، تعلیق حساب توسط سرویس های سوء استفاده و شناسایی تهدید.

کاربر درخواست لغو پیوند از Google را داده است

لغو پیوند حساب که از طریق حساب یا برنامه Google کاربر آغاز می‌شود، هرگونه دسترسی صادر شده قبلی و نشانه‌های تازه‌سازی را حذف می‌کند، رضایت کاربر را حذف می‌کند و در صورت تمایل به اجرای آن، به صورت اختیاری نقطه پایان لغو رمز شما را فراخوانی می‌کند.

کاربر درخواست لغو پیوند از پلتفرم شما را داده است

شما باید مکانیزمی برای لغو پیوند کاربران ارائه دهید، مانند URL به حساب خود. اگر راهی برای لغو پیوند به کاربران ارائه نمی کنید، پیوندی به حساب Google اضافه کنید تا کاربران بتوانند حساب پیوند شده خود را مدیریت کنند.

شما می توانید انتخاب کنید که ریسک و رویداد اشتراک گذاری و همکاری (RISC) را اجرا کنید و Google را از تغییرات وضعیت پیوند دادن حساب کاربران مطلع کنید. این امکان یک تجربه کاربری بهبود یافته را فراهم می کند که در آن هم پلتفرم شما و هم Google وضعیت پیوند فعلی و ثابتی را بدون نیاز به تکیه بر درخواست رمز به روز رسانی یا دسترسی برای به روز رسانی وضعیت پیوند نشان می دهند.

انقضای توکن

برای ارائه یک تجربه کاربری روان و جلوگیری از اختلال در سرویس، Google تلاش می‌کند تا توکن‌های تازه‌سازی را در پایان عمرشان تمدید کند. در برخی از سناریوها، ممکن است رضایت کاربر برای پیوند مجدد حساب‌ها در صورت در دسترس نبودن رمز تازه‌سازی معتبر لازم باشد.

طراحی پلتفرم شما برای پشتیبانی از چندین دسترسی منقضی نشده و توکن‌های تازه‌سازی می‌تواند شرایط مسابقه موجود در مبادلات مشتری-سرور بین محیط‌های خوشه‌ای را به حداقل برساند، از اختلال کاربر جلوگیری کند و سناریوهای پیچیده زمان‌بندی و رسیدگی به خطا را به حداقل برساند. در حالی که در نهایت سازگار است، هر دو توکن منقضی نشده قبلی و تازه صادر شده ممکن است برای مدت کوتاهی در طول مبادله تمدید توکن مشتری-سرور و قبل از همگام سازی خوشه استفاده شوند. به عنوان مثال، درخواست Google به سرویس شما که از کد دسترسی منقضی نشده قبلی استفاده می‌کند، درست پس از صدور یک نشانه دسترسی جدید، اما قبل از دریافت و همگام‌سازی خوشه‌ای در Google انجام می‌شود. اقدامات امنیتی جایگزین برای Refresh Token Rotation توصیه می شود.

رویدادهای دیگر

حساب ها می توانند به دلایل مختلف دیگری مانند عدم فعالیت، تعلیق، رفتار مخرب و غیره لغو پیوند شوند. در چنین سناریوهایی، پلتفرم شما و Google می‌توانند به بهترین شکل حساب‌های کاربری را مدیریت کرده و با اطلاع رسانی به یکدیگر از تغییرات حساب و وضعیت پیوند، مجدداً پیوند دهند.

یک نقطه پایانی ابطال رمز را برای Google اجرا کنید و با استفاده از RISC از رویدادهای لغو رمز خود به Google اطلاع دهید تا مطمئن شوید که پلتفرم شما و Google وضعیت پیوند حساب کاربری ثابتی را حفظ می کنند.

نقطه پایان لغو رمز

If you support an OAuth 2.0 token revocation endpoint, your platform can receive notifications from Google. This lets you inform users of link state changes, invalidate a token, and cleanup security credentials and authorization grants.

The request has the following form:

POST /revoke HTTP/1.1
Host: oauth2.example.com
Content-Type: application/x-www-form-urlencoded

client_id=GOOGLE_CLIENT_ID&client_secret=GOOGLE_CLIENT_SECRET&token=TOKEN&token_type_hint=refresh_token

Your token revocation endpoint must be able to handle the following parameters:

Revocation endpoint parameters
client_id A string that identifies the request origin as Google. This string must be registered within your system as Google's unique identifier.
client_secret A secret string that you registered with Google for your service.
token The token to be revoked.
token_type_hint (Optional) The type of token being revoked, either an access_token or refresh_token. If unspecified, defaults to access_token.

Return a response when the token is deleted or invalid. See the following for an example:

HTTP/1.1 200 Success
Content-Type: application/json;charset=UTF-8

If the token can't be deleted for any reason, return a 503 response code, as shown in the following example:

HTTP/1.1 503 Service Unavailable
Content-Type: application/json;charset=UTF-8
Retry-After: HTTP-date / delay-seconds

Google retries the request later or as requested by Retry-After.

حفاظت از حساب های متقابل (RISC)

If you support Cross-Account Protection, your platform can notify Google when access or refresh tokens are revoked. This allows Google to inform users of link state changes, invalidate the token, cleanup security credentials, and authorization grants.

Cross-Account Protection is based on the RISC standard developed at the OpenID Foundation.

A Security Event Token is used to notify Google of token revocation.

When decoded, a token revocation event looks like the following example:

{
  "iss":"http://risc.example.com",
  "iat":1521068887,
  "aud":"google_account_linking",
  "jti":"101942095",
  "toe": "1508184602",
  "events": {
    "https://schemas.openid.net/secevent/oauth/event-type/token-revoked":{
      "subject_type": "oauth_token",
      "token_type": "refresh_token",
      "token_identifier_alg": "hash_SHA512_double",
      "token": "double SHA-512 hash value of token"
    }
  }
}

Security Event Tokens that you use to notify Google of token revocation events must conform to the requirements in the following table:

Token revocation events
iss Issuer Claim: This is a URL which you host, and it's shared with Google during registration.
aud Audience Claim: This identifies Google as the JWT recipient. It must be set to google_account_linking.
jti JWT ID Claim: This is a unique ID that you generate for every security event token.
iat Issued At Claim: This is a NumericDate value that represents the time when this security event token was created.
toe Time of Event Claim: This is an optional NumericDate value that represents the time at which the token was revoked.
exp Expiration Time Claim: Do not include this field, as the event resulting in this notification has already taken place.
events
Security Events Claim: This is a JSON object, and must include only a single token revocation event.
subject_type This must be set to oauth_token.
token_type This is the type of token being revoked, either access_token or refresh_token.
token_identifier_alg This is the algorithm used to encode the token, and it must be hash_SHA512_double.
token This is the ID of the revoked token.

For more information on field types and formats, see JSON Web Token (JWT).