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

Validator callback don't works #58

Open
lzricardo opened this issue Mar 4, 2020 · 0 comments
Open

Validator callback don't works #58

lzricardo opened this issue Mar 4, 2020 · 0 comments

Comments

@lzricardo
Copy link

Hi guys, i'm trying to use Mirage's validator but did not called. I follow the documentation's example, like:

/* Requires ...*/

const options = {
    'mirage timeout': process.env.PRIMUS_SESSION_ID_TIMEOUT,
    authorization : authorizationHandler
};

/* Class begin */

/* Code inside constructor*/
this.primus = new Primus(this.server, options);

this.primus.plugin('mirage', Mirage);

this.primus.id.validator(function validator(spark, fn) {
    console.log('validator');

    fn(undefined, 'foo');
});

Generator and timeout works correctly. Any idea?

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant