orisai/nette-http – http authenticator and more

Marek Bartoš
Nette Blogger | 1146
+
+3
-

Just released new Orisai library, orisai/nette-http.

It currently has two features – testing implementation of Nette\Http\IResponse for unit tests and HttpAuthenticator.

HttpAuthenticator makes app unavailable without a password and so is ideal for hiding a dev version of an app available over the internet. Minimal configuration may look like this:

extensions:
	orisai.http.auth: OriNette\Http\Auth\DI\HttpAuthExtension

orisai.http.auth:
	enabled: true
	users:
		# change this, seriously
		username: password

Paths can be excluded, e.g. for an already password-protected API, so you don't have to add another form of authentication

orisai.http.auth:
	exclude:
		paths:
			- /api

If you use Tracy and have it set to debug mode, it is auto-disabled for non-authenticated users, so you don't cause yourself a security issue.

Check the docs, this was just a brief overview

Oh, and it contains semi-hidden joke :)

emololftw
Member | 79
+
0
-

Perfect library.. ⭐ed

Marek Bartoš
Nette Blogger | 1146
+
0
-

Just added a Tracy panel with http request and response for a quick view

extensions:
	orisai.http.panel: OriNette\Http\Tracy\DI\HttpPanelExtension

orisai.http.panel:
	enabled: %debugMode%