mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
parent
7a830b19d7
commit
ff716504b0
2 changed files with 14 additions and 5 deletions
|
@ -810,7 +810,7 @@ in {
|
|||
nginx-proxyprotocol = runTest ./nginx-proxyprotocol/default.nix;
|
||||
nginx-pubhtml = runTest ./nginx-pubhtml.nix;
|
||||
nginx-redirectcode = runTest ./nginx-redirectcode.nix;
|
||||
nginx-sso = handleTest ./nginx-sso.nix {};
|
||||
nginx-sso = runTest ./nginx-sso.nix;
|
||||
nginx-status-page = handleTest ./nginx-status-page.nix {};
|
||||
nginx-tmpdir = handleTest ./nginx-tmpdir.nix {};
|
||||
nginx-unix-socket = handleTest ./nginx-unix-socket.nix {};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "nginx-sso";
|
||||
meta = {
|
||||
maintainers = with pkgs.lib.maintainers; [ ambroisie ];
|
||||
|
@ -8,7 +9,10 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
services.nginx.sso = {
|
||||
enable = true;
|
||||
configuration = {
|
||||
listen = { addr = "127.0.0.1"; port = 8080; };
|
||||
listen = {
|
||||
addr = "127.0.0.1";
|
||||
port = 8080;
|
||||
};
|
||||
|
||||
providers.token.tokens = {
|
||||
myuser = {
|
||||
|
@ -19,7 +23,12 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
acl = {
|
||||
rule_sets = [
|
||||
{
|
||||
rules = [ { field = "x-application"; equals = "MyApp"; } ];
|
||||
rules = [
|
||||
{
|
||||
field = "x-application";
|
||||
equals = "MyApp";
|
||||
}
|
||||
];
|
||||
allow = [ "myuser" ];
|
||||
}
|
||||
];
|
||||
|
@ -47,4 +56,4 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
"curl -sSf -H 'Authorization: Token MyToken' -H 'X-Application: MyApp' http://localhost:8080/auth"
|
||||
)
|
||||
'';
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue