Feat rebrand armature (#43)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #43.
This commit is contained in:
@@ -3,7 +3,7 @@ package auth_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"switchboard-core/auth"
|
||||
"armature/auth"
|
||||
)
|
||||
|
||||
func TestOIDCProvider_Discovery(t *testing.T) {
|
||||
@@ -12,7 +12,7 @@ func TestOIDCProvider_Discovery(t *testing.T) {
|
||||
|
||||
p, err := auth.NewOIDCProvider(auth.OIDCConfig{
|
||||
IssuerURL: idp.IssuerURL(),
|
||||
ClientID: "switchboard",
|
||||
ClientID: "armature",
|
||||
ClientSecret: "secret",
|
||||
AutoActivate: true,
|
||||
})
|
||||
@@ -38,7 +38,7 @@ func TestOIDCProvider_Mode(t *testing.T) {
|
||||
|
||||
p, err := auth.NewOIDCProvider(auth.OIDCConfig{
|
||||
IssuerURL: idp.IssuerURL(),
|
||||
ClientID: "switchboard",
|
||||
ClientID: "armature",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("NewOIDCProvider: %v", err)
|
||||
@@ -55,7 +55,7 @@ func TestOIDCProvider_NoRegistration(t *testing.T) {
|
||||
|
||||
p, err := auth.NewOIDCProvider(auth.OIDCConfig{
|
||||
IssuerURL: idp.IssuerURL(),
|
||||
ClientID: "switchboard",
|
||||
ClientID: "armature",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("NewOIDCProvider: %v", err)
|
||||
@@ -68,7 +68,7 @@ func TestOIDCProvider_NoRegistration(t *testing.T) {
|
||||
|
||||
func TestOIDCProvider_MissingIssuer(t *testing.T) {
|
||||
_, err := auth.NewOIDCProvider(auth.OIDCConfig{
|
||||
ClientID: "switchboard",
|
||||
ClientID: "armature",
|
||||
})
|
||||
if err == nil {
|
||||
t.Error("expected error for missing issuer URL")
|
||||
@@ -93,7 +93,7 @@ func TestOIDCProvider_AuthorizationURL(t *testing.T) {
|
||||
|
||||
p, err := auth.NewOIDCProvider(auth.OIDCConfig{
|
||||
IssuerURL: idp.IssuerURL(),
|
||||
ClientID: "switchboard",
|
||||
ClientID: "armature",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("NewOIDCProvider: %v", err)
|
||||
@@ -105,7 +105,7 @@ func TestOIDCProvider_AuthorizationURL(t *testing.T) {
|
||||
}
|
||||
|
||||
// Should contain the required OIDC parameters
|
||||
for _, want := range []string{"response_type=code", "client_id=switchboard", "state=test-state", "nonce=test-nonce"} {
|
||||
for _, want := range []string{"response_type=code", "client_id=armature", "state=test-state", "nonce=test-nonce"} {
|
||||
if !containsStr(url, want) {
|
||||
t.Errorf("AuthorizationURL missing %q in %q", want, url)
|
||||
}
|
||||
@@ -115,7 +115,7 @@ func TestOIDCProvider_AuthorizationURL(t *testing.T) {
|
||||
func TestOIDCProvider_UnreachableIssuer(t *testing.T) {
|
||||
_, err := auth.NewOIDCProvider(auth.OIDCConfig{
|
||||
IssuerURL: "http://127.0.0.1:1/unreachable",
|
||||
ClientID: "switchboard",
|
||||
ClientID: "armature",
|
||||
})
|
||||
if err == nil {
|
||||
t.Error("expected error for unreachable issuer")
|
||||
|
||||
Reference in New Issue
Block a user