Get external user¶
Retrieves external-user data via the remote SecurityApi; this library never uses the returned data in an authorization decision.
| Field | Value |
|---|---|
| Operation ID | OP-08 |
| Trigger | Caller code requests external-user data (sourced from EXT oracle tables by the remote service). |
| Inputs | userId. |
| Outputs | ExternalUser, or a thrown SecurityClientException. |
| Primary components | SecurityClient.GetExternalUser(userId) |
| Entry point | src/SAIF.NetCore.AuthService/SAIF.NetCore.AuthService/SAIF.NetCore.AuthService/Clients/SecurityClient.cs |
Steps¶
GET /v1/ExternalData/User/{userId}throughHandleSecurityServiceGetResponse<ExternalUser>(BR-AUTH-011)- 1.1 Await the GET call.
- 1.2 On success, return
result.GetResult<ExternalUser>(). - 1.3 Otherwise, if
result.ErrorExceptionis present, throwSecurityClientException(result.ErrorMessage, result.ErrorException)(error with inner exception). - 1.4 Otherwise (no inner exception), throw
SecurityClientException(result.ErrorMessage).
Origin: Steps 1.1–1.4 are implemented in Handle a Security API response (
SAIF.NetCore.AuthService) and executed on behalf of this operation.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([GetExternalUser called]) --> Get["GET /v1/ExternalData/User/userId"]
Get --> Success{IsSuccessful?}
Success -->|Yes| Return([Return ExternalUser])
Success -->|No| Throw([Throw SecurityClientException])
Failure and edge-case behavior¶
- A non-success remote response throws
SecurityClientException.
Related documentation¶
Sources¶
src/SAIF.NetCore.AuthService/SAIF.NetCore.AuthService/SAIF.NetCore.AuthService/Clients/SecurityClient.cs