Last active
February 9, 2022 21:57
-
-
Save MeetMartin/d1c83a29f80a84e687135a7874614849 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DIDPushAuthentication = request => | |
compose( | |
map(passThrough(() => logger.debug('DID Push Authentication Success.'))), | |
flatMap(pushAuthentication), | |
flatMap(saveChallenge), | |
flatMap(decryptedDID => eitherToAsyncEffect(getEnvironmentVariables({ ...request, recipientDid: decryptedDID }))), | |
flatMap(did => eitherToAsyncEffect(getDecryptedDID(did))), | |
map(response => response.data.did), | |
flatMap(() => getDIDByUserName(request.userName)), | |
eitherToAsyncEffect, | |
validateRequest, | |
map(passThrough(request => logger.debug(`DID Push Authentication Request: ${deepInspect(request)}`))) | |
)(request); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment