Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: return a promise in onchallenge #178

Closed
konsultaner opened this issue Feb 11, 2016 · 3 comments
Closed

Feature Request: return a promise in onchallenge #178

konsultaner opened this issue Feb 11, 2016 · 3 comments
Labels

Comments

@konsultaner
Copy link

@konsultaner konsultaner commented Feb 11, 2016

I would like to have the chance to return a promise for the signature creation in the onchallenge handler. Some two factor authentications like oAuth2 have a async signature or token creation. I currently try to connect WAMP to oAuth2.

something like that:

return function (session, method, extra) {
    if (method === "wampcra") {
        return autobahn.auth_cra.sign(autobahn.auth_cra.derive_key(password || "", extra.salt,extra.iterations,extra.keylen), extra.challenge);
    } else if (method === "oauth2.authorization_code_grant") {
        return new Promise(...);
    }
}
@oberstet

This comment has been minimized.

Copy link
Member

@oberstet oberstet commented Feb 11, 2016

Yes, agreed. That would be useful!

@konsultaner

This comment has been minimized.

Copy link
Author

@konsultaner konsultaner commented Mar 20, 2018

@oberstet according to

cujojs/when#505 (comment)

and

when_fn.call(self._onchallenge, self, method, extra).then(

this issue is solved?

@oberstet

This comment has been minimized.

Copy link
Member

@oberstet oberstet commented Mar 20, 2018

yep, solved

@oberstet oberstet closed this Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.