The hub as an OpenID Connect provider for T5DE Music
This commit is contained in:
1 parent
f0a9661f8e
commit
096ee32fa5
20 files changed
+6531
-29
No files matched your search
@@ -0,0 +1,150 @@
|
||||
CREATE TABLE "oauth_access_token" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"token" text NOT NULL,
|
||||
"client_id" text NOT NULL,
|
||||
"session_id" text,
|
||||
"user_id" text,
|
||||
"reference_id" text,
|
||||
"authorization_code_id" text,
|
||||
"resources" text[],
|
||||
"requested_user_info_claims" text[],
|
||||
"refresh_id" text,
|
||||
"expires_at" timestamp with time zone NOT NULL,
|
||||
"created_at" timestamp with time zone NOT NULL,
|
||||
"revoked" timestamp with time zone,
|
||||
"confirmation" jsonb,
|
||||
"scopes" text[] NOT NULL,
|
||||
CONSTRAINT "oauth_access_token_token_unique" UNIQUE("token")
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "oauth_client" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"client_id" text NOT NULL,
|
||||
"client_secret" text,
|
||||
"client_discovery_id" text,
|
||||
"disabled" boolean DEFAULT false,
|
||||
"skip_consent" boolean,
|
||||
"enable_end_session" boolean,
|
||||
"subject_type" text,
|
||||
"scopes" text[],
|
||||
"client_credentials_scopes" text[] DEFAULT '{}'::text[],
|
||||
"user_id" text,
|
||||
"created_at" timestamp with time zone,
|
||||
"updated_at" timestamp with time zone,
|
||||
"name" text,
|
||||
"uri" text,
|
||||
"icon" text,
|
||||
"contacts" text[],
|
||||
"tos" text,
|
||||
"policy" text,
|
||||
"software_id" text,
|
||||
"software_version" text,
|
||||
"software_statement" text,
|
||||
"redirect_uris" text[] NOT NULL,
|
||||
"post_logout_redirect_uris" text[],
|
||||
"backchannel_logout_uri" text,
|
||||
"backchannel_logout_session_required" boolean,
|
||||
"token_endpoint_auth_method" text,
|
||||
"application_type" text,
|
||||
"jwks" text,
|
||||
"jwks_uri" text,
|
||||
"grant_types" text[],
|
||||
"response_types" text[],
|
||||
"require_pkce" boolean,
|
||||
"dpop_bound_access_tokens" boolean DEFAULT false,
|
||||
"reference_id" text,
|
||||
"metadata" jsonb,
|
||||
CONSTRAINT "oauth_client_client_id_unique" UNIQUE("client_id")
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "oauth_client_assertion" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"expires_at" timestamp with time zone NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "oauth_client_resource" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"client_id" text NOT NULL,
|
||||
"resource_id" text NOT NULL,
|
||||
"metadata" jsonb,
|
||||
"created_at" timestamp with time zone
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "oauth_consent" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"client_id" text NOT NULL,
|
||||
"user_id" text,
|
||||
"reference_id" text,
|
||||
"resources" text[],
|
||||
"requested_user_info_claims" text[],
|
||||
"scopes" text[] NOT NULL,
|
||||
"created_at" timestamp with time zone NOT NULL,
|
||||
"updated_at" timestamp with time zone NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "oauth_refresh_token" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"token" text NOT NULL,
|
||||
"client_id" text NOT NULL,
|
||||
"session_id" text,
|
||||
"user_id" text NOT NULL,
|
||||
"reference_id" text,
|
||||
"authorization_code_id" text,
|
||||
"resources" text[],
|
||||
"requested_user_info_claims" text[],
|
||||
"expires_at" timestamp with time zone NOT NULL,
|
||||
"created_at" timestamp with time zone NOT NULL,
|
||||
"revoked" timestamp with time zone,
|
||||
"rotated_at" timestamp with time zone,
|
||||
"rotation_replay_response" text,
|
||||
"rotation_replay_expires_at" timestamp with time zone,
|
||||
"auth_time" timestamp with time zone,
|
||||
"confirmation" jsonb,
|
||||
"scopes" text[] NOT NULL,
|
||||
CONSTRAINT "oauth_refresh_token_token_unique" UNIQUE("token")
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "oauth_resource" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"identifier" text NOT NULL,
|
||||
"name" text NOT NULL,
|
||||
"access_token_ttl" integer,
|
||||
"refresh_token_ttl" integer,
|
||||
"signing_algorithm" text,
|
||||
"signing_key_id" text,
|
||||
"allowed_scopes" text[],
|
||||
"custom_claims" jsonb,
|
||||
"dpop_bound_access_tokens_required" boolean DEFAULT false,
|
||||
"disabled" boolean DEFAULT false,
|
||||
"created_at" timestamp with time zone,
|
||||
"updated_at" timestamp with time zone,
|
||||
"policy_version" integer DEFAULT 1,
|
||||
"metadata" jsonb,
|
||||
CONSTRAINT "oauth_resource_identifier_unique" UNIQUE("identifier")
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "oauth_access_token" ADD CONSTRAINT "oauth_access_token_client_id_oauth_client_client_id_fk" FOREIGN KEY ("client_id") REFERENCES "public"."oauth_client"("client_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_access_token" ADD CONSTRAINT "oauth_access_token_session_id_session_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."session"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_access_token" ADD CONSTRAINT "oauth_access_token_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_access_token" ADD CONSTRAINT "oauth_access_token_refresh_id_oauth_refresh_token_id_fk" FOREIGN KEY ("refresh_id") REFERENCES "public"."oauth_refresh_token"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_client" ADD CONSTRAINT "oauth_client_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_client_resource" ADD CONSTRAINT "oauth_client_resource_client_id_oauth_client_client_id_fk" FOREIGN KEY ("client_id") REFERENCES "public"."oauth_client"("client_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_client_resource" ADD CONSTRAINT "oauth_client_resource_resource_id_oauth_resource_identifier_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."oauth_resource"("identifier") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_consent" ADD CONSTRAINT "oauth_consent_client_id_oauth_client_client_id_fk" FOREIGN KEY ("client_id") REFERENCES "public"."oauth_client"("client_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_consent" ADD CONSTRAINT "oauth_consent_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_refresh_token" ADD CONSTRAINT "oauth_refresh_token_client_id_oauth_client_client_id_fk" FOREIGN KEY ("client_id") REFERENCES "public"."oauth_client"("client_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_refresh_token" ADD CONSTRAINT "oauth_refresh_token_session_id_session_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."session"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "oauth_refresh_token" ADD CONSTRAINT "oauth_refresh_token_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
CREATE INDEX "oauth_access_token_client" ON "oauth_access_token" USING btree ("client_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_access_token_session" ON "oauth_access_token" USING btree ("session_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_access_token_user" ON "oauth_access_token" USING btree ("user_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_access_token_code" ON "oauth_access_token" USING btree ("authorization_code_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_access_token_refresh" ON "oauth_access_token" USING btree ("refresh_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_client_resource_client" ON "oauth_client_resource" USING btree ("client_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_client_resource_resource" ON "oauth_client_resource" USING btree ("resource_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_consent_client" ON "oauth_consent" USING btree ("client_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_consent_user" ON "oauth_consent" USING btree ("user_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_refresh_token_client" ON "oauth_refresh_token" USING btree ("client_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_refresh_token_session" ON "oauth_refresh_token" USING btree ("session_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_refresh_token_user" ON "oauth_refresh_token" USING btree ("user_id");--> statement-breakpoint
|
||||
CREATE INDEX "oauth_refresh_token_code" ON "oauth_refresh_token" USING btree ("authorization_code_id");
|
||||
File diff suppressed because it is too large.
Load diff
@@ -155,6 +155,13 @@
|
||||
"when": 1795079107938,
|
||||
"tag": "0021_account_kind",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 22,
|
||||
"version": "7",
|
||||
"when": 1795079888659,
|
||||
"tag": "0022_oauth_provider",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user