abstract-service-model
Concept
-
request ->
io.handler
invocation -
io.handler
invokes sequentaly:-
authenticator.identify
with extracted tokens, (abstract methodauthTokens
should implement auth tokens extraction from Input data) ifauthenticator
is provided forio
-
executable.run
with extracted data (abstract methoddata
should implement data extraction from Input data) - return Promise with
fail
method result ifidentify
orrun
method return error,success
method success otherwise
-
-
executable.run
invokes:-
_authenticate
method ifidentity
is provided forrun
whereidentity
gets asked to check for realm and operation configured for executable (_authenticate
method could be reimplemented) -
_execute
method - abstract, should implement actual logic.
-