functie 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.
Gebruik en aanroep
De functie ara::diag::ClientAuthentication::Authenticate wordt door een applicatie aangeroepen om de succesvolle authenticatie van een diagnoseclient door te geven aan de Diagnostic Server-instantie [SWS_DM_01142]. Dit kan plaatsvinden na een authenticatie via de interfaces van de Diagnostic Server of via applicatie-eigen mechanismen [SWS_DM_01142].
Als invoerparameter accepteert de functie userRoles (van het type ara::core::Vector<DiagnosticAuthRole>). Bij een succesvolle aanroep wisselt de authenticatiestatus van de instantie naar kAuthenticated en worden de overgedragen gebruikersrollen definitief overgenomen [SWS_DM_01206]. Als retourwaarde levert zij een ara::core::Result<ClientAuthenticationHandle> [SWS_DM_01142]. Aangezien er direct een Result-object beschikbaar wordt gesteld, vindt de verwerking vermoedelijk synchroon in de aanroepende context plaats. Vraag Q-dae22c82694f2103 (open)
Foutafhandeling en gelijktijdigheid
De methode is gedeclareerd als noexcept en geldt als uitzonderingsveilig (exception safe) [SWS_DM_01142]. Treedt er een fout op omdat fundamentele functionaliteiten van de Diagnostic Manager op het moment van aanroepen niet beschikbaar zijn, dan mislukt de operatie met rollback-semantiek en retourneert zij DiagErrc::kServiceNotAvailable in het Result-object [SWS_DM_01142].
Wat betreft gelijktijdigheid is de methode uitdrukkelijk gespecificeerd als not thread-safe [SWS_DM_01142]. Parallelle aanroepen op hetzelfde ClientAuthentication-object zijn daarom niet toegestaan en moeten door de applicatie worden gesynchroniseerd.
Zusammenspiel en levenscyclus
De verkregen ClientAuthenticationHandle stelt de applicatie in staat om een DynamicAccessList voor de geauthentiseerde client te definiëren of uit te breiden [SWS_DM_01142]. Bovendien start of refereert de aanroep de inactiviteitsbewaking van de client: blijft na succesvolle authenticatie in de standaardsessietoestand gedurende authenticationTimeout een volgend UDS-verzoek uit, dan reset de Diagnostic Server-instantie de client automatisch weer naar kDeAuthenticated [SWS_DM_01210]. Om deze time-out te voorkomen, kan de applicatie de timer via de methode Refresh van de handle bijwerken [SWS_DM_01155].
Deze tekst is gegenereerd door een AI op basis van de AUTOSAR-specificatie.
Implementer's Guide volgt (complexiteit 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#346a8f6e- Content hash
346a8f6e- 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 · Duits origineel