SecuredBaseController

dev.cheleb.ziojwt.SecuredBaseController
trait SecuredBaseController[SI, Principal](principalExtractor: SI => Task[Principal])

A base controller for all secured endpoints

Value parameters

principalExtractor

the function to extract the principal from the Security Input

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Extensions

Extensions

extension [I, O, R](endpoint: Endpoint[SI, I, Throwable, O, R])
def securedServerLogic(logic: Principal => I => Task[O]): ServerEndpoint[R, Task]

ZIO security logic for a server endpoint

ZIO security logic for a server endpoint

Extracts the user principal from the request Security Input, and applies

Value parameters

logic,

curryied function from user principal to request to response

Attributes