From ce768cb734657c6f05b0444ebdfa6db5bdf50ac5 Mon Sep 17 00:00:00 2001
From: xeruf <27jf@pm.me>
Date: Wed, 16 Nov 2022 10:15:17 +0000
Subject: [PATCH] infra: add custom oauthclients

---
 basic/apps/code/metallb-gitea.yaml            |  5 ---
 .../kustomizations/oauth-clients.yaml         | 39 +++++++++++++++++++
 2 files changed, 39 insertions(+), 5 deletions(-)
 create mode 100644 basic/infrastructure/kustomizations/oauth-clients.yaml

diff --git a/basic/apps/code/metallb-gitea.yaml b/basic/apps/code/metallb-gitea.yaml
index 6d8d242..176a611 100644
--- a/basic/apps/code/metallb-gitea.yaml
+++ b/basic/apps/code/metallb-gitea.yaml
@@ -1,5 +1,4 @@
 # https://metallb.org/usage/
-#apiVersion: metallb.io/v1beta1
 apiVersion: v1
 kind: Service
 metadata:
@@ -17,7 +16,3 @@ spec:
       targetPort: 22
   selector:
     app: gitea
-#status:
-#  loadBalancer:
-#    ingress:
-#    - ip: "${ip_address}"
diff --git a/basic/infrastructure/kustomizations/oauth-clients.yaml b/basic/infrastructure/kustomizations/oauth-clients.yaml
new file mode 100644
index 0000000..a7480d9
--- /dev/null
+++ b/basic/infrastructure/kustomizations/oauth-clients.yaml
@@ -0,0 +1,39 @@
+apiVersion: hydra.ory.sh/v1alpha1
+kind: OAuth2Client
+metadata:
+  name: nextcloud-home-oauth-client
+  namespace: flux-system
+spec:
+  grantTypes:
+    - authorization_code
+    - refresh_token
+    - client_credentials
+    - implicit
+  responseTypes:
+    - id_token
+    - code
+  scope: "openid profile email stackspin_roles"
+  secretName: stackspin-nextcloud-home-oauth-variables
+  redirectUris:
+    - https://files.home.${domain}/apps/sociallogin/custom_oidc/stackspin
+  tokenEndpointAuthMethod: client_secret_post
+--
+apiVersion: hydra.ory.sh/v1alpha1
+kind: OAuth2Client
+metadata:
+  name: wikijs-oauth-client
+  namespace: flux-system
+spec:
+  grantTypes:
+    - authorization_code
+    - refresh_token
+    - client_credentials
+    - implicit
+  responseTypes:
+    - id_token
+    - code
+  scope: "openid profile email stackspin_roles"
+  secretName: stackspin-wikijs-oauth-variables
+  #redirectUris:
+  #  - https://wiki.${domain}/user/oauth2/Stackspin/callback
+  tokenEndpointAuthMethod: client_secret_post
-- 
GitLab