Class AuthorizationException
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
অনুমোদন ব্যতিক্রম একটি ত্রুটি যা ব্যবহারকারীকে দেখানোর জন্য একটি অনুমোদন কার্ড ট্রিগার করতে ফেরত যেতে পারে৷
CardService.newAuthorizationException()
.setAuthorizationUrl('http://auth.com/')
.setResourceDisplayName('Example Resource')
.throwException();
বিস্তারিত ডকুমেন্টেশন
print Json()
এই বস্তুর JSON উপস্থাপনা প্রিন্ট করে। এটি শুধুমাত্র ডিবাগ করার জন্য।
প্রত্যাবর্তন
String
set Authorization Url(authUrl)
অনুমোদন প্রম্পট থেকে ব্যবহারকারীকে নেওয়া হয় এমন অনুমোদনের URL সেট করে। প্রয়োজন।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
auth Url | String | অনুমোদনের URL সেট করতে। |
প্রত্যাবর্তন
Authorization Exception
- এই বস্তুটি, চেইনিংয়ের জন্য।
set Custom Ui Callback(callback)
একটি কাস্টম অনুমোদন প্রম্পট তৈরি করতে কল করার জন্য একটি ফাংশনের নাম৷ ঐচ্ছিক।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
callback | String | ফাংশনের নাম যা একটি কাস্টম অনুমোদন প্রম্পট তৈরি করে। |
প্রত্যাবর্তন
Authorization Exception
- এই বস্তুটি, চেইনিংয়ের জন্য।
set Resource Display Name(name)
অনুমোদনের জন্য জিজ্ঞাসা করার সময় ব্যবহারকারীর কাছে প্রদর্শিত নাম সেট করে। প্রয়োজন।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
name | String | প্রদর্শনের নাম। |
প্রত্যাবর্তন
Authorization Exception
- এই বস্তুটি, চেইনিংয়ের জন্য।
throw Exception()
নিক্ষিপ্ত এই ব্যতিক্রম ট্রিগার.
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003e\u003ccode\u003eAuthorizationException\u003c/code\u003e triggers an authorization card to obtain user authorization.\u003c/p\u003e\n"],["\u003cp\u003eIt allows setting an authorization URL, a resource display name, and optionally, a custom authorization prompt.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers use \u003ccode\u003esetAuthorizationUrl()\u003c/code\u003e, \u003ccode\u003esetResourceDisplayName()\u003c/code\u003e, and \u003ccode\u003esetCustomUiCallback()\u003c/code\u003e to configure the authorization request.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ethrowException()\u003c/code\u003e initiates the authorization flow, prompting the user to grant access.\u003c/p\u003e\n"],["\u003cp\u003eDebugging is facilitated by \u003ccode\u003eprintJson()\u003c/code\u003e which outputs the object's JSON representation.\u003c/p\u003e\n"]]],[],null,["# Class AuthorizationException\n\nAuthorizationException\n\nAn error that can be returned to trigger an authorization card to be shown to the user.\n\n```javascript\nCardService.newAuthorizationException()\n .setAuthorizationUrl('http://auth.com/')\n .setResourceDisplayName('Example Resource')\n .throwException();\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------------------------------------------|-----------------------------|---------------------------------------------------------------------------------|\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n| [setAuthorizationUrl(authUrl)](#setAuthorizationUrl(String)) | [AuthorizationException](#) | Sets the authorization URL that user is taken to from the authorization prompt. |\n| [setCustomUiCallback(callback)](#setCustomUiCallback(String)) | [AuthorizationException](#) | The name of a function to call to generate a custom authorization prompt. |\n| [setResourceDisplayName(name)](#setResourceDisplayName(String)) | [AuthorizationException](#) | Sets the name that is displayed to the user when asking for authorization. |\n| [throwException()](#throwException()) | `void` | Triggers this exception to be thrown. |\n\nDetailed documentation\n----------------------\n\n### `print``Json()`\n\nPrints the JSON representation of this object. This is for debugging only.\n\n#### Return\n\n\n`String`\n\n*** ** * ** ***\n\n### `set``Authorization``Url(authUrl)`\n\nSets the authorization URL that user is taken to from the authorization prompt. Required.\n\n#### Parameters\n\n| Name | Type | Description |\n|-------------|----------|-------------------------------|\n| `auth``Url` | `String` | The authorization URL to set. |\n\n#### Return\n\n\n[AuthorizationException](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Custom``Ui``Callback(callback)`\n\nThe name of a function to call to generate a custom authorization prompt. Optional.\n\n#### Parameters\n\n| Name | Type | Description |\n|------------|----------|------------------------------------------------------------------------|\n| `callback` | `String` | The name of the function that generates a custom authorization prompt. |\n\n#### Return\n\n\n[AuthorizationException](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Resource``Display``Name(name)`\n\nSets the name that is displayed to the user when asking for authorization. Required.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------|----------|-------------------|\n| `name` | `String` | The display name. |\n\n#### Return\n\n\n[AuthorizationException](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `throw``Exception()`\n\nTriggers this exception to be thrown."]]