Coder Social home page Coder Social logo

Authentification default about lout HOT 4 CLOSED

MathieuLoutre avatar MathieuLoutre commented on June 5, 2024
Authentification default

from lout.

Comments (4)

hueniverse avatar hueniverse commented on June 5, 2024

So hapi master with lout master, and an auth scheme loaded with defaultMode?

from lout.

MathieuLoutre avatar MathieuLoutre commented on June 5, 2024

It was Hapi commit 3b2d53f96a3a8d3d0f17c7c669b5f12f98f7bfa2 "Cleaning up tests and schema to work with latest joi, lout" (no longer master) and the current Lout master. Hawk in defaultMode: true.

I will pull the latest changes to Hapi and see if that changes anything.

from lout.

hueniverse avatar hueniverse commented on June 5, 2024

Are you trying to require auth or ignore auth?

from lout.

MathieuLoutre avatar MathieuLoutre commented on June 5, 2024

So, I have:

server.plugin.require('lout', function() {
  return server.start();
});

and the server is configured with

{
  cors: {
    additionalHeaders: ['Cache-Control']
  },
  files: {
    relativeTo: 'routes'
  },
  auth: {
    scheme: 'hawk',
    getCredentialsFunc: function(id, callback) {
      // ...
      });
    },
    defaultMode: true
  }
}

So what happens is, I guess, because authentication is enabled by default on all routes, it's also enabled on the route added by Lout (/docs) and therefore you'd need to be authenticated to access it. So, if you can add an option to specify that you want the route added by Lout to have auth: false in its config, it would solve the problem. This would be to ignore the auth.

from lout.

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.