Feat rebrand armature (#43)
All checks were successful
CI/CD / detect-changes (push) Successful in 3s
CI/CD / test-frontend (push) Successful in 5s
CI/CD / test-go-pg (push) Successful in 2m34s
CI/CD / test-sqlite (push) Successful in 2m46s
CI/CD / build-and-deploy (push) Successful in 1m55s

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:
2026-03-31 23:25:37 +00:00
committed by xcaliber
parent fb5284f667
commit 680ec3b897
321 changed files with 956 additions and 1033 deletions

View File

@@ -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")