mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: convert to oidc out of experimental (#8742)
This commit is contained in:
Generated
-3
@@ -110,7 +110,6 @@ export interface AuthMethod {
|
||||
|
||||
// From codersdk/users.go
|
||||
export interface AuthMethods {
|
||||
readonly convert_to_oidc_enabled: boolean
|
||||
readonly password: AuthMethod
|
||||
readonly github: AuthMethod
|
||||
readonly oidc: OIDCAuthMethod
|
||||
@@ -1560,7 +1559,6 @@ export const Entitlements: Entitlement[] = [
|
||||
|
||||
// From codersdk/deployment.go
|
||||
export type Experiment =
|
||||
| "convert-to-oidc"
|
||||
| "moons"
|
||||
| "single_tailnet"
|
||||
| "tailnet_pg_coordinator"
|
||||
@@ -1568,7 +1566,6 @@ export type Experiment =
|
||||
| "template_restart_requirement"
|
||||
| "workspace_actions"
|
||||
export const Experiments: Experiment[] = [
|
||||
"convert-to-oidc",
|
||||
"moons",
|
||||
"single_tailnet",
|
||||
"tailnet_pg_coordinator",
|
||||
|
||||
@@ -28,7 +28,6 @@ SigningIn.args = {
|
||||
...SignedOut.args,
|
||||
isSigningIn: true,
|
||||
authMethods: {
|
||||
convert_to_oidc_enabled: false,
|
||||
password: { enabled: true },
|
||||
github: { enabled: true },
|
||||
oidc: { enabled: false, signInText: "", iconUrl: "" },
|
||||
@@ -56,7 +55,6 @@ export const WithGithub = Template.bind({})
|
||||
WithGithub.args = {
|
||||
...SignedOut.args,
|
||||
authMethods: {
|
||||
convert_to_oidc_enabled: false,
|
||||
password: { enabled: true },
|
||||
github: { enabled: true },
|
||||
oidc: { enabled: false, signInText: "", iconUrl: "" },
|
||||
@@ -67,7 +65,6 @@ export const WithOIDC = Template.bind({})
|
||||
WithOIDC.args = {
|
||||
...SignedOut.args,
|
||||
authMethods: {
|
||||
convert_to_oidc_enabled: false,
|
||||
password: { enabled: true },
|
||||
github: { enabled: false },
|
||||
oidc: { enabled: true, signInText: "", iconUrl: "" },
|
||||
@@ -78,7 +75,6 @@ export const WithOIDCWithoutPassword = Template.bind({})
|
||||
WithOIDCWithoutPassword.args = {
|
||||
...SignedOut.args,
|
||||
authMethods: {
|
||||
convert_to_oidc_enabled: false,
|
||||
password: { enabled: false },
|
||||
github: { enabled: false },
|
||||
oidc: { enabled: true, signInText: "", iconUrl: "" },
|
||||
@@ -89,7 +85,6 @@ export const WithoutAny = Template.bind({})
|
||||
WithoutAny.args = {
|
||||
...SignedOut.args,
|
||||
authMethods: {
|
||||
convert_to_oidc_enabled: false,
|
||||
password: { enabled: false },
|
||||
github: { enabled: false },
|
||||
oidc: { enabled: false, signInText: "", iconUrl: "" },
|
||||
@@ -100,7 +95,6 @@ export const WithGithubAndOIDC = Template.bind({})
|
||||
WithGithubAndOIDC.args = {
|
||||
...SignedOut.args,
|
||||
authMethods: {
|
||||
convert_to_oidc_enabled: false,
|
||||
password: { enabled: true },
|
||||
github: { enabled: true },
|
||||
oidc: { enabled: true, signInText: "", iconUrl: "" },
|
||||
|
||||
@@ -61,7 +61,6 @@ describe("LoginPage", () => {
|
||||
|
||||
it("shows github authentication when enabled", async () => {
|
||||
const authMethods: TypesGen.AuthMethods = {
|
||||
convert_to_oidc_enabled: false,
|
||||
password: { enabled: true },
|
||||
github: { enabled: true },
|
||||
oidc: { enabled: true, signInText: "", iconUrl: "" },
|
||||
@@ -113,7 +112,6 @@ describe("LoginPage", () => {
|
||||
|
||||
it("hides password authentication if OIDC/GitHub is enabled and displays on click", async () => {
|
||||
const authMethods: TypesGen.AuthMethods = {
|
||||
convert_to_oidc_enabled: false,
|
||||
password: { enabled: true },
|
||||
github: { enabled: true },
|
||||
oidc: { enabled: true, signInText: "", iconUrl: "" },
|
||||
|
||||
@@ -53,17 +53,13 @@ export const SecurityPage: FC = () => {
|
||||
},
|
||||
},
|
||||
}}
|
||||
oidc={
|
||||
authMethods.convert_to_oidc_enabled
|
||||
? {
|
||||
section: {
|
||||
authMethods,
|
||||
userLoginType,
|
||||
...singleSignOnSection,
|
||||
},
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
oidc={{
|
||||
section: {
|
||||
authMethods,
|
||||
userLoginType,
|
||||
...singleSignOnSection,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1113,7 +1113,6 @@ export const MockAuthMethods: TypesGen.AuthMethods = {
|
||||
password: { enabled: true },
|
||||
github: { enabled: false },
|
||||
oidc: { enabled: false, signInText: "", iconUrl: "" },
|
||||
convert_to_oidc_enabled: true,
|
||||
}
|
||||
|
||||
export const MockAuthMethodsWithPasswordType: TypesGen.AuthMethods = {
|
||||
|
||||
Reference in New Issue
Block a user