sttp.tapir.server
Type members
Classlikes
An endpoint with the security logic provided, and the main logic yet unspecified. See Endpoint.serverSecurityLogic.
An endpoint with the security logic provided, and the main logic yet unspecified. See Endpoint.serverSecurityLogic.
The provided security part of the server logic transforms inputs of type SECURITY_INPUT
, either to an error of type ERROR_OUTPUT
, or
value of type PRINCIPAL
.
The part of the server logic which is not provided, will have to transform both PRINCIPAL
and the rest of the input INPUT
either
into an error, or a value of type OUTPUT
.
Inputs/outputs can be added to partial endpoints as to regular endpoints. The shape of the error outputs can be adjusted in a limited
way, by adding new error output variants, similar as if they were defined using Tapir.oneOf; the variants and the existing error
outputs should usually have a common supertype (other than Any
). Hence, it's possible to create a base, secured input, and then
specialise it with inputs, outputs and logic as needed.
- Type parameters:
- ERROR_OUTPUT
Error output parameter types.
- F
The effect type used in the provided partial server logic.
- INPUT
Input parameter types.
- OUTPUT
Output parameter types.
- PRINCIPAL
The type of the value returned by the security logic.
- R
The capabilities that are required by this endpoint's inputs/outputs.
Any
, if no requirements.- SECURITY_INPUT
Security input parameter types, which the security logic accepts and returns a
PRINCIPAL
or an errorERROR_OUTPUT
.
An endpoint with the security logic provided, and the main logic yet unspecified. See Endpoint.serverSecurityLogicWithOutput.
An endpoint with the security logic provided, and the main logic yet unspecified. See Endpoint.serverSecurityLogicWithOutput.
The provided security part of the server logic transforms inputs of type SECURITY_INPUT
, either to an error of type ERROR_OUTPUT
, or
to a tuple consisting of values of types SECURITY_OUPUT
and PRINCIPAL
.
The part of the server logic which is not provided, will have to transform both PRINCIPAL
and the rest of the input INPUT
either
into an error, or a value of type OUTPUT
. The response is then built from SECURITY_OUTPUT
and OUTPUT
combined.
Inputs/outputs can be added to partial endpoints as to regular endpoints. The shape of the error outputs can be adjusted in a limited
way, by adding new error output variants, similar as if they were defined using Tapir.oneOf; the variants and the existing error
outputs should usually have a common supertype (other than Any
). Hence, it's possible to create a base, secured input, and then
specialise it with inputs, outputs and logic as needed.
- Type parameters:
- ERROR_OUTPUT
Error output parameter types.
- F
The effect type used in the provided partial server logic.
- INPUT
Input parameter types.
- OUTPUT
Output parameter types.
- PRINCIPAL
The type of the value returned by the security logic.
- R
The capabilities that are required by this endpoint's inputs/outputs.
Any
, if no requirements.- SECURITY_INPUT
Security input parameter types, which the security logic accepts and returns a
PRINCIPAL
or an errorERROR_OUTPUT
.- SECURITY_OUTPUT
Security output parameter types.