GithubHelp home page GithubHelp logo

Comments (3)

Matthias247 avatar Matthias247 commented on July 22, 2024

Don't understand it correctly: Do you need client or server side authentication?
I guess that's server side? Unfortunatly currently there are no server-side auth features implemented.
For the client side some parts were contributed here: #39

from jawampa.

marvin-bitterlich avatar marvin-bitterlich commented on July 22, 2024

I habe a jawampa client connecting to a crossbar.io router. And the crossbar.io router has a dynamic authorisation feature, so that my client becomes the approver if someone can register a procedure etc. (explained in the linked docs)

What I have to do is register a procedure, which will get a call for each request other clients make an can approve or decline them.

But the parameters were unclear in what they are, so I was hoping, someone has some example code on how to make these procedures.

Am 29.10.2015 22:48 schrieb Matthias Einwag [email protected]:

Don't understand it correctly: Do you need client or server side authentication?
I guess that's server side? Unfortunatly currently there are no server-side auth features implemented.
For the client side some parts were contributed here: #39


Reply to this email directly or view it on GitHub.

from jawampa.

marvin-bitterlich avatar marvin-bitterlich commented on July 22, 2024

Got it to work with:

request -> {
    if (request.arguments() == null || request.arguments().size() != 3) {
        try {
            request.replyError(new ApplicationError(ApplicationError.INVALID_PARAMETER));
        } catch (ApplicationError e) {
            LOGGER.log(Level.FINE, "There was an ApplicationError", e);
        }
    } else {
        String user = request.arguments().get(0).findValue("authid").asText();
        String URI = request.arguments().get(1).asText();
        String action = request.arguments().get(2).asText();
        LOGGER.info("User " + user + " tries to " + action + " on " + URI);
        if (user.equals("joe") && URI.startsWith("com")) {
            request.reply(true);
        }
        request.reply(false);
    }
}

from jawampa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.