SecuredBaseController

dev.cheleb.ziotapir.server.SecuredBaseController
trait SecuredBaseController[SI, Principal, STREAMS <: ZioStreams](principalExtractor: SI => Task[Principal]) extends BaseController[STREAMS]

A base controller for all secured endpoints

Value parameters

principalExtractor

the function to extract the principal from the Security Input

Attributes

Graph
Supertypes
trait BaseController[STREAMS]
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def routes: List[ServerEndpoint[Any, Task]]

List of routes that will be added to the server

List of routes that will be added to the server

Attributes

Inherited from:
BaseController
def streamRoutes: List[ServerEndpoint[STREAMS, Task]]

List of stream routes that will be added to the server

List of stream routes that will be added to the server

Attributes

Inherited from:
BaseController

Extensions

Extensions

extension [I, O, R](endpoint: Endpoint[SI, I, Throwable, O, R])
def zServerAuthenticatedLogic(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