Authentication
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Giao diện google.maps.journeySharing.AuthToken
Mã thông báo xác thực do trình tìm nạp mã thông báo trả về.
Thuộc tính |
expiresInSeconds |
Loại: number
Thời gian hết hạn tính bằng giây. Mã thông báo sẽ hết hạn trong khoảng thời gian này sau khi tìm nạp. |
token |
Loại: string
Mã thông báo. |
Giao diện google.maps.journeySharing.AuthTokenContext
Chứa thông tin bổ sung cần thiết để tạo mã thông báo web JSON.
Thuộc tính |
deliveryVehicleId optional |
Loại: string optional
Khi được cung cấp, mã thông báo đã tạo phải có một thông báo xác nhận quyền sở hữu DeliveryVehicleId riêng tư cho deliveryVehicleId đã cung cấp. |
taskId optional |
Loại: string optional
Khi được cung cấp, mã thông báo đã tạo phải có một thông báo xác nhận quyền sở hữu TaskId riêng tư cho taskId đã cung cấp. |
trackingId optional |
Loại: string optional
Khi được cung cấp, mã thông báo đã tạo phải có một thông báo xác nhận quyền sở hữu TrackingId riêng tư cho mã theo dõi đã cung cấp. |
tripId optional |
Loại: string optional
Khi được cung cấp, mã thông báo đã tạo phải có một tuyên bố TripId riêng tư cho tripId đã cung cấp. |
vehicleId optional |
Loại: string optional
Khi được cung cấp, mã thông báo đã tạo phải có một tuyên bố VehicleId riêng tư cho vehicleId đã cung cấp. |
google.maps.journeySharing.AuthTokenFetcher
typedef
Loại hàm mã thông báo xác thực.
Hàm chấp nhận đối tượng AuthTokenFetcherOptions
, chứa thông tin chi tiết về mã thông báo xác thực sẽ được tạo. Hàm này sẽ tạo mã thông báo và trả về một AuthToken
chứa mã thông báo và thời gian hết hạn của mã thông báo đó.
function(AuthTokenFetcherOptions): Promise<AuthToken>
Giao diện google.maps.journeySharing.AuthTokenFetcherOptions
Các tuỳ chọn cho trình tìm nạp mã thông báo xác thực.
Thuộc tính |
context |
Ngữ cảnh mã xác thực. Bạn nên thêm các mã nhận dạng được chỉ định trong ngữ cảnh vào yêu cầu được gửi đến điểm cuối tạo mã thông báo Web JSON. |
serviceType |
Loại dịch vụ của công cụ Đội xe. |
Hằng số google.maps.journeySharing.FleetEngineServiceType
Các loại dịch vụ Động cơ cho đội xe.
Truy cập bằng cách gọi const {FleetEngineServiceType} = await google.maps.importLibrary("journeySharing")
. Xem phần Thư viện trong API Maps JavaScript.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-12-22 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-12-22 UTC."],[],[],null,["# Authentication\n\nThe documentation for has moved to a different page.\n\nThe documentation for the linked item could not be found. \n\n[AuthToken](#AuthToken)\ninterface\n---------------------------------\n\n\ngoogle.maps.journeySharing`.`AuthToken\ninterface\n\nThe auth token returned by the token fetcher.\n\n| ### Properties ||\n|-------------------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| [expiresInSeconds](#AuthToken.expiresInSeconds) | **Type:** `number` The expiration time in seconds. A token expires in this amount of time after fetching. |\n| [token](#AuthToken.token) | **Type:** `string` The token. |\n\n[AuthTokenContext](#AuthTokenContext)\ninterface\n-----------------------------------------------\n\n\ngoogle.maps.journeySharing`.`AuthTokenContext\ninterface\n\nContains additional information needed to mint JSON Web Tokens.\n\n| ### Properties ||\n|---------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| [deliveryVehicleId](#AuthTokenContext.deliveryVehicleId)` `optional | **Type:** `string `optional When provided, the minted token should have a private `DeliveryVehicleId` claim for the provided deliveryVehicleId. |\n| [taskId](#AuthTokenContext.taskId)` `optional | **Type:** `string `optional When provided, the minted token should have a private `TaskId` claim for the provided taskId. |\n| [trackingId](#AuthTokenContext.trackingId)` `optional | **Type:** `string `optional When provided, the minted token should have a private `TrackingId` claim for the provided trackingId. |\n| [tripId](#AuthTokenContext.tripId)` `optional | **Type:** `string `optional When provided, the minted token should have a private `TripId` claim for the provided tripId. |\n| [vehicleId](#AuthTokenContext.vehicleId)` `optional | **Type:** `string `optional When provided, the minted token should have a private `VehicleId` claim for the provided vehicleId. |\n\n[AuthTokenFetcher](#AuthTokenFetcher)\ntypedef\n---------------------------------------------\n\n\ngoogle.maps.journeySharing`.`AuthTokenFetcher\ntypedef\n\nAuth token function type. \n\nA function that accepts a [AuthTokenFetcherOptions](/maps/documentation/javascript/reference/journey-sharing-authentication#AuthTokenFetcherOptions) object, containing details about the auth token to be minted. This function should mint the token and return a [AuthToken](/maps/documentation/javascript/reference/journey-sharing-authentication#AuthToken) containing the token and its expiry time.\n\n`function(`[AuthTokenFetcherOptions](/maps/documentation/javascript/reference/journey-sharing-authentication#AuthTokenFetcherOptions)`): `[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)`\u003c`[AuthToken](/maps/documentation/javascript/reference/journey-sharing-authentication#AuthToken)`\u003e` \n\n[AuthTokenFetcherOptions](#AuthTokenFetcherOptions)\ninterface\n-------------------------------------------------------------\n\n\ngoogle.maps.journeySharing`.`AuthTokenFetcherOptions\ninterface\n\nOptions for the auth token fetcher.\n\n| ### Properties ||\n|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [context](#AuthTokenFetcherOptions.context) | **Type:** [AuthTokenContext](/maps/documentation/javascript/reference/journey-sharing-authentication#AuthTokenContext) The auth token context. IDs specified in the context should be added to the request sent to the JSON Web Token minting endpoint. |\n| [serviceType](#AuthTokenFetcherOptions.serviceType) | **Type:** [FleetEngineServiceType](/maps/documentation/javascript/reference/journey-sharing-authentication#FleetEngineServiceType) The Fleet Engine service type. |\n\n[FleetEngineServiceType](#FleetEngineServiceType)\nconstants\n-----------------------------------------------------------\n\n\ngoogle.maps.journeySharing`.`FleetEngineServiceType\nconstants\n\nTypes of Fleet Engine services.\n\nAccess by calling `const {FleetEngineServiceType} = await google.maps.importLibrary(\"journeySharing\")`. \nSee [Libraries in the Maps JavaScript API](/maps/documentation/javascript/libraries).\n\n| ### Constants ||\n|------------------------------------------------------------------------------|--------------------------------------------------------|\n| [DELIVERY_VEHICLE_SERVICE](#FleetEngineServiceType.DELIVERY_VEHICLE_SERVICE) | Fleet Engine service used to access delivery vehicles. |\n| [TASK_SERVICE](#FleetEngineServiceType.TASK_SERVICE) | Fleet Engine service used to access task information. |\n| [TRIP_SERVICE](#FleetEngineServiceType.TRIP_SERVICE) | Fleet Engine service used to access trip information. |\n| [UNKNOWN_SERVICE](#FleetEngineServiceType.UNKNOWN_SERVICE) | Unknown Fleet Engine service. |"]]