função 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.
Uso e chamada
A função ara::diag::ClientAuthentication::Authenticate é chamada por uma aplicação para comunicar à instância do Diagnostic Server a autenticação bem-sucedida de um cliente de diagnóstico [SWS_DM_01142]. Isso pode ocorrer após uma autenticação por meio das interfaces do Diagnostic Server ou por meio de mecanismos próprios da aplicação [SWS_DM_01142].
Como parâmetro de entrada, a função recebe userRoles (do tipo ara::core::Vector<DiagnosticAuthRole>). Em caso de chamada bem-sucedida, o status de autenticação da instância muda para kAuthenticated e as funções de usuário passadas são adotadas em definitivo [SWS_DM_01206]. Como valor de retorno, ela fornece um ara::core::Result<ClientAuthenticationHandle> [SWS_DM_01142]. Como um objeto Result é disponibilizado imediatamente, presume-se que o processamento ocorra de forma síncrona no contexto chamador. Pergunta Q-dae22c82694f2103 (aberta)
Tratamento de erros e simultaneidade
O método está declarado como noexcept e é considerado seguro contra exceções (exception safe) [SWS_DM_01142]. Se ocorrer um erro devido à indisponibilidade de funcionalidades fundamentais do Diagnostic Manager no momento da chamada, a operação falha com semântica de rollback e retorna DiagErrc::kServiceNotAvailable no objeto Result [SWS_DM_01142].
Em relação à concorrência, o método está expressamente especificado como not thread-safe [SWS_DM_01142]. Chamadas paralelas no mesmo objeto ClientAuthentication são, portanto, inadmissíveis e devem ser sincronizadas pela aplicação.
Zusammenspiel e ciclo de vida
O ClientAuthenticationHandle obtido permite à aplicação definir ou estender uma DynamicAccessList para o cliente autenticado [SWS_DM_01142]. Além disso, a chamada inicia ou referencia o monitoramento de inatividade do cliente: se, após uma autenticação bem-sucedida no estado de sessão padrão, nenhuma outra solicitação UDS ocorrer pela duração de authenticationTimeout, a instância do Diagnostic Server redefine automaticamente o cliente de volta para kDeAuthenticated [SWS_DM_01210]. Para prevenir este timeout, a aplicação pode atualizar o temporizador por meio do método Refresh do handle [SWS_DM_01155].
Este texto foi gerado por uma IA com base na especificação AUTOSAR.
Guia do implementador em breve (complexidade 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#5a6d0f32- Content hash
5a6d0f32- 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 · Original em alemão