mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 16:30:17 +02:00
Rename Authenticator to Authenticate.
Rename single-constructor packages NewProxy and NewAuthenticator to New Removed unused upstreamTransport.
This commit is contained in:
parent
2c7a7f2e02
commit
44527662fd
10 changed files with 55 additions and 89 deletions
|
@ -12,8 +12,8 @@ import (
|
|||
"github.com/pomerium/pomerium/internal/templates"
|
||||
)
|
||||
|
||||
func testAuthenticator() *Authenticator {
|
||||
var auth Authenticator
|
||||
func testAuthenticate() *Authenticate {
|
||||
var auth Authenticate
|
||||
auth.RedirectURL, _ = url.Parse("https://auth.example.com/oauth/callback")
|
||||
auth.SharedKey = "IzY7MOZwzfOkmELXgozHDKTxoT3nOYhwkcmUVINsRww="
|
||||
auth.AllowedDomains = []string{"*"}
|
||||
|
@ -23,8 +23,8 @@ func testAuthenticator() *Authenticator {
|
|||
return &auth
|
||||
}
|
||||
|
||||
func TestAuthenticator_PingPage(t *testing.T) {
|
||||
auth := testAuthenticator()
|
||||
func TestAuthenticate_PingPage(t *testing.T) {
|
||||
auth := testAuthenticate()
|
||||
req, err := http.NewRequest("GET", "/ping", nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
@ -41,8 +41,8 @@ func TestAuthenticator_PingPage(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestAuthenticator_RobotsTxt(t *testing.T) {
|
||||
auth := testAuthenticator()
|
||||
func TestAuthenticate_RobotsTxt(t *testing.T) {
|
||||
auth := testAuthenticate()
|
||||
req, err := http.NewRequest("GET", "/robots.txt", nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
@ -60,8 +60,8 @@ func TestAuthenticator_RobotsTxt(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestAuthenticator_SignInPage(t *testing.T) {
|
||||
auth := testAuthenticator()
|
||||
func TestAuthenticate_SignInPage(t *testing.T) {
|
||||
auth := testAuthenticate()
|
||||
v := url.Values{}
|
||||
v.Set("request_uri", "this-is-a-test-uri")
|
||||
url := fmt.Sprintf("/signin?%s", v.Encode())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue