How to use the matrix-appservice.AppServiceRegistration.generateToken function in matrix-appservice

To help you get started, we’ve selected a few matrix-appservice examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github matrix-org / matrix-appservice-bridge / verto / verto.js View on Github external
generateRegistration: function(appServiceUrl, callback) {
        var reg = new AppServiceRegistration(appServiceUrl);
        reg.setHomeserverToken(AppServiceRegistration.generateToken());
        reg.setAppServiceToken(AppServiceRegistration.generateToken());
        reg.setSenderLocalpart("vertobot");
        reg.addRegexPattern("users", "@" + USER_PREFIX + ".*", true);
        console.log(
            "Generating registration to '%s' for the AS accessible from: %s",
            REGISTRATION_FILE, appServiceUrl
        );
        callback(reg);
    },
    run: runBridge
github matrix-org / matrix-appservice-bridge / example.js View on Github external
generateRegistration: function(callback) {
        var reg = new AppServiceRegistration("http://localhost:8008");
        reg.setHomeserverToken(AppServiceRegistration.generateToken());
        reg.setAppServiceToken(AppServiceRegistration.generateToken());
        reg.setSenderLocalpart("bridge-example");
        reg.addRegexPattern("users", "@example_.*", true);
        console.log("Generating registration to 'my-bridge-registration.yaml'");
        callback(reg);
    }
});
github matrix-org / matrix-appservice-bridge / example.js View on Github external
generateRegistration: function(callback) {
        var reg = new AppServiceRegistration("http://localhost:8008");
        reg.setHomeserverToken(AppServiceRegistration.generateToken());
        reg.setAppServiceToken(AppServiceRegistration.generateToken());
        reg.setSenderLocalpart("bridge-example");
        reg.addRegexPattern("users", "@example_.*", true);
        console.log("Generating registration to 'my-bridge-registration.yaml'");
        callback(reg);
    }
});
github matrix-org / matrix-appservice-bridge / verto / verto.js View on Github external
generateRegistration: function(appServiceUrl, callback) {
        var reg = new AppServiceRegistration(appServiceUrl);
        reg.setHomeserverToken(AppServiceRegistration.generateToken());
        reg.setAppServiceToken(AppServiceRegistration.generateToken());
        reg.setSenderLocalpart("vertobot");
        reg.addRegexPattern("users", "@" + USER_PREFIX + ".*", true);
        console.log(
            "Generating registration to '%s' for the AS accessible from: %s",
            REGISTRATION_FILE, appServiceUrl
        );
        callback(reg);
    },
    run: runBridge