Class OidcResultHttpStatus
Single source for the HTTP status the API layer returns for each OIDC failure. The controller derives response status codes from this table, and the handlers derive the pass-through HttpStatus values from the same table — so the off-boarding dashboards can never drift from what the API actually returned.
public static class OidcResultHttpStatus
- Inheritance
-
objectOidcResultHttpStatus
Fields
BadGateway
public const int BadGateway = 502
Field Value
- int
BadRequest
public const int BadRequest = 400
Field Value
- int
Forbidden
public const int Forbidden = 403
Field Value
- int
ServiceUnavailable
public const int ServiceUnavailable = 503
Field Value
- int
Methods
For(OidcExchangeFailureReason)
The status the API ultimately returns for a code-exchange failure, for log entries written before the failure is translated into a handler result. Mirrors For<T>(Result<T>) composed with the handler's reason translation.
public static int For(OidcExchangeFailureReason reason)
Parameters
reasonOidcExchangeFailureReason
Returns
- int
For<T>(Result<T>)
The status the API returns for a failed OIDC handler result: forbidden → 403; not configured → 503; upstream IdP unreachable → 502; validation, precondition, and anything else → 400.
public static int For<T>(Result<T> result)
Parameters
resultResult<T>
Returns
- int
Type Parameters
T