Skip to content

Commit

Permalink
fix test URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Percival committed Jan 16, 2017
1 parent 6945872 commit 0d2970a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,47 @@

HTTP service for single sign-on session tracking authenticated against Microsoft Azure AD.

## How it works


## Example nginx config
# nginx.conf

http {
upstream authome_test {
ip_hash;
server 192.168.1.1:8080;
server 192.168.2.1:8080;
}

server {
server_name authome-test.example.com
include listen/https_noauth;
include custom/authome_uat_auth_location;

location / {
include uwsgi_params;
uwsgi_pass authome_test;
}
}

}

# uwsgi_params
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;

uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param HTTPS $https if_not_empty;

uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;


7 changes: 4 additions & 3 deletions authome/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.contrib.auth.models import User
from django.shortcuts import reverse
from django.test import TestCase, Client

import base64
Expand All @@ -8,9 +9,9 @@

class AuthTestCase(TestCase):
client = Client()
auth_url = '/auth'
auth_ip_url = '/auth_ip'
auth_dual_url = '/auth_dual'
auth_url = reverse('auth')
auth_ip_url = reverse('auth_ip')
auth_dual_url = reverse('auth_dual')
username = 'testu'
email = 'test.user@test.domain'
password = 'testpass'
Expand Down

0 comments on commit 0d2970a

Please sign in to comment.