Skip to content

Instantly share code, notes, and snippets.

@MeetMartin
Created January 31, 2022 00:20
Show Gist options
  • Save MeetMartin/307ddf0e33059cb2c32e9069016ab135 to your computer and use it in GitHub Desktop.
Save MeetMartin/307ddf0e33059cb2c32e9069016ab135 to your computer and use it in GitHub Desktop.
const checkAuthenticationStatus = request =>
compose(
map(passThrough(response => logger.debug(`DID Authentication Status Response: ${deepInspect(response)}`))),
flatMap(response => eitherToAsyncEffect(getJWT(response))),
flatMap(() => getAuthenticationByChallengeId(request)),
eitherToAsyncEffect,
validateRequest,
map(passThrough(request => logger.debug(`DID Authentication Status Request: ${deepInspect(request)}`)))
)(request);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment