फ़ंक्शन Authenticate [SWS_DM_01142] Upstream: RS_Diag_04251
ara::core::Result< ClientAuthenticationHandle > Authenticate (ara::core::Vector< DiagnosticAuthRole > userRoles) noexcept;
This function is used by the application to report the authenticated state to the Diagnostic Server instance. The authentication could be either done using the Authentication interfaces of the Diagnostic Server instance, or through other means in the application.
उपयोग और कॉल
फ़ंक्शन ara::diag::ClientAuthentication::Authenticate को डायग्नोस्टिक सर्वर इंस्टेंस को डायग्नोस्टिक क्लाइंट के सफल प्रमाणीकरण की सूचना देने के लिए एक एप्लिकेशन द्वारा कॉल किया जाता है [SWS_DM_01142]। यह डायग्नोस्टिक सर्वर के इंटरफ़ेस के माध्यम से या एप्लिकेशन के स्वयं के तंत्र के माध्यम से प्रमाणीकरण के बाद हो सकता है [SWS_DM_01142]।
इनपुट पैरामीटर के रूप में, फ़ंक्शन userRoles (प्रकार ara::core::Vector<DiagnosticAuthRole> का) स्वीकार करता है। सफल कॉल पर, इंस्टेंस की प्रमाणीकरण स्थिति kAuthenticated में बदल जाती है और पास की गई उपयोगकर्ता भूमिकाएँ स्थायी रूप से अपना ली जाती हैं [SWS_DM_01206]। रिटर्न मान के रूप में, यह एक ara::core::Result<ClientAuthenticationHandle> लौटाता है [SWS_DM_01142]। चूँकि एक Result ऑब्जेक्ट तुरंत प्रदान किया जाता है, प्रसंस्करण कॉलिंग संदर्भ में सिंक्रोनस रूप से होने की संभावना है। प्रश्न Q-dae22c82694f2103 (खुला)
त्रुटि हैंडलिंग और समवर्तीता
मेथड को noexcept के रूप में घोषित किया गया है और इसे अपवाद-सुरक्षित (exception safe) माना जाता है [SWS_DM_01142]। यदि कॉल के समय Diagnostic Manager की मौलिक कार्यक्षमताएँ उपलब्ध न होने के कारण कोई त्रुटि होती है, तो ऑपरेशन रोलबैक सेमेंटिक्स के साथ विफल हो जाता है और Result ऑब्जेक्ट में DiagErrc::kServiceNotAvailable लौटाता है [SWS_DM_01142]।
कॉनकरेंसी के संबंध में, मेथड को स्पष्ट रूप से not thread-safe के रूप में निर्दिष्ट किया गया है [SWS_DM_01142]। इसलिए समान ClientAuthentication ऑब्जेक्ट पर समानांतर कॉल्स अस्वीकार्य हैं और एप्लिकेशन द्वारा सिंक्रनाइज़ की जानी चाहिए।
अंतःक्रिया और जीवन चक्र
प्राप्त ClientAuthenticationHandle एप्लिकेशन को प्रमाणित क्लाइंट के लिए DynamicAccessList को परिभाषित या विस्तारित करने में सक्षम बनाता है [SWS_DM_01142]। इसके अलावा, कॉल क्लाइंट की निष्क्रियता निगरानी को प्रारंभ या संदर्भित करता है: यदि सफल प्रमाणीकरण के बाद डिफ़ॉल्ट सत्र स्थिति में authenticationTimeout की अवधि के लिए कोई अन्य UDS अनुरोध प्राप्त नहीं होता है, तो डायग्नोस्टिक सर्वर इंस्टेंस स्वचालित रूप से क्लाइंट को वापस kDeAuthenticated पर रीसेट कर देता है [SWS_DM_01210]। इस टाइमआउट को रोकने के लिए, एप्लिकेशन हैंडल की मेथड Refresh के माध्यम से टाइमर को रीफ़्रेश कर सकता है [SWS_DM_01155]।
यह पाठ AUTOSAR विनिर्देश के आधार पर एक AI द्वारा तैयार किया गया था।
इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I2)
| Header-Datei | #include "ara/diag/client_authentication.h" |
|---|---|
| Scope | class ara::diag::ClientAuthentication |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | not thread-safe |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| userRoles | The user roles to set on the diagnostic client |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result< ClientAuthenticationHandle > | A handler of the Authentication State, which can be used by the application to set or extend the DynamicAccessList |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| DiagErrc::kServiceNotAvailable | rollback_semantics The call cannot be executed, because essential DM functionality is currently not available. |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_DM_01142- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_DM_01142@rel:R25-11#7292d69a- Content hash
7292d69a- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01142
Status: valid/unmigrated
Version: rel:R25-11#17cf8f55
Versionshistorie & Revisions (1 transition, 6 revision)
- Current State
valid/unmigrated- Reason
- mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
- Campaign
2026-08-13-status-backfill- Active Version
AUTOSAR/AP/record/SWS_DM_01142@rel:R25-11#17cf8f55
Recorded Revisions (6):
- R25-11
rel:R25-11#ffd39a4b2026-09-30 - R21-11
rel:R21-11#6f17bd9a2026-10-14 - R22-11
rel:R22-11#1579f1692026-10-14 - R23-11
rel:R23-11#3b67657b2026-10-14 - R24-11
rel:R24-11#575f1e5f2026-10-14 - R25-11
rel:R25-11#17cf8f552026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · जर्मन मूल