keycloakify 9.0.0-rc.1 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +9 -18
  2. package/bin/keycloakify/generateJavaStackFiles/bringInAccountV1.js +0 -4
  3. package/bin/keycloakify/generateJavaStackFiles/bringInAccountV1.js.map +1 -1
  4. package/bin/keycloakify/generateJavaStackFiles/generateJavaStackFiles.js +32 -103
  5. package/bin/keycloakify/generateJavaStackFiles/generateJavaStackFiles.js.map +1 -1
  6. package/bin/keycloakify/generateStartKeycloakTestingContainer.d.ts +1 -0
  7. package/bin/keycloakify/generateStartKeycloakTestingContainer.js +4 -3
  8. package/bin/keycloakify/generateStartKeycloakTestingContainer.js.map +1 -1
  9. package/bin/keycloakify/keycloakify.js +2 -1
  10. package/bin/keycloakify/keycloakify.js.map +1 -1
  11. package/login/kcContext/KcContext.d.ts +1 -0
  12. package/login/kcContext/KcContext.js.map +1 -1
  13. package/login/kcContext/kcContextMocks.js +8 -4
  14. package/login/kcContext/kcContextMocks.js.map +1 -1
  15. package/login/pages/LoginDeviceVerifyUserCode.js +1 -2
  16. package/login/pages/LoginDeviceVerifyUserCode.js.map +1 -1
  17. package/login/pages/LoginOauthGrant.js +1 -2
  18. package/login/pages/LoginOauthGrant.js.map +1 -1
  19. package/package.json +1 -67
  20. package/src/bin/keycloakify/generateJavaStackFiles/bringInAccountV1.ts +0 -5
  21. package/src/bin/keycloakify/generateJavaStackFiles/generateJavaStackFiles.ts +32 -103
  22. package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +11 -4
  23. package/src/bin/keycloakify/keycloakify.ts +2 -1
  24. package/src/login/kcContext/KcContext.ts +1 -0
  25. package/src/login/kcContext/kcContextMocks.ts +8 -4
  26. package/src/login/pages/LoginDeviceVerifyUserCode.tsx +1 -2
  27. package/src/login/pages/LoginOauthGrant.tsx +1 -2
  28. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/AccountPages.java +0 -33
  29. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/AccountProvider.java +0 -76
  30. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/AccountProviderFactory.java +0 -25
  31. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/AccountSpi.java +0 -50
  32. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/FreeMarkerAccountProvider.java +0 -424
  33. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/FreeMarkerAccountProviderFactory.java +0 -51
  34. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/Templates.java +0 -51
  35. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/AccountBean.java +0 -91
  36. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/AccountFederatedIdentityBean.java +0 -157
  37. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/ApplicationsBean.java +0 -258
  38. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/AuthorizationBean.java +0 -515
  39. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/FeaturesBean.java +0 -56
  40. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/LogBean.java +0 -95
  41. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/PasswordBean.java +0 -34
  42. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/RealmBean.java +0 -75
  43. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/ReferrerBean.java +0 -38
  44. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/SessionsBean.java +0 -93
  45. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/TotpBean.java +0 -125
  46. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/UrlBean.java +0 -121
  47. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/services/AccountUrls.java +0 -115
  48. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/services/resources/account/AccountFormService.java +0 -1310
  49. package/bin/keycloakify/generateJavaStackFiles/account-v1-java/services/resources/account/AccountFormServiceFactory.java +0 -64
  50. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/AccountPages.java +0 -33
  51. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/AccountProvider.java +0 -76
  52. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/AccountProviderFactory.java +0 -25
  53. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/AccountSpi.java +0 -50
  54. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/FreeMarkerAccountProvider.java +0 -424
  55. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/FreeMarkerAccountProviderFactory.java +0 -51
  56. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/Templates.java +0 -51
  57. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/AccountBean.java +0 -91
  58. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/AccountFederatedIdentityBean.java +0 -157
  59. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/ApplicationsBean.java +0 -258
  60. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/AuthorizationBean.java +0 -515
  61. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/FeaturesBean.java +0 -56
  62. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/LogBean.java +0 -95
  63. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/PasswordBean.java +0 -34
  64. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/RealmBean.java +0 -75
  65. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/ReferrerBean.java +0 -38
  66. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/SessionsBean.java +0 -93
  67. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/TotpBean.java +0 -125
  68. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/forms/account/freemarker/model/UrlBean.java +0 -121
  69. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/services/AccountUrls.java +0 -115
  70. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/services/resources/account/AccountFormService.java +0 -1310
  71. package/src/bin/keycloakify/generateJavaStackFiles/account-v1-java/services/resources/account/AccountFormServiceFactory.java +0 -64
@@ -84,9 +84,4 @@ export async function bringInAccountV1(params: { buildOptions: BuildOptionsLike
84
84
  "utf8"
85
85
  )
86
86
  );
87
-
88
- transformCodebase({
89
- "srcDirPath": pathJoin(__dirname, "account-v1-java"),
90
- "destDirPath": pathJoin(buildOptions.keycloakifyBuildDirPath, "src", "main", "java", "org", "keycloak")
91
- });
92
87
  }
@@ -36,113 +36,42 @@ export async function generateJavaStackFiles(params: {
36
36
  const pomFileCode = [
37
37
  `<?xml version="1.0"?>`,
38
38
  `<project xmlns="http://maven.apache.org/POM/4.0.0"`,
39
- ` xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"`,
40
- ` xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">`,
41
- ` <modelVersion>4.0.0</modelVersion>`,
39
+ ` xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"`,
40
+ ` xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">`,
41
+ ` <modelVersion>4.0.0</modelVersion>`,
42
42
  ` <groupId>${buildOptions.groupId}</groupId>`,
43
43
  ` <artifactId>${buildOptions.artifactId}</artifactId>`,
44
44
  ` <version>${buildOptions.themeVersion}</version>`,
45
45
  ` <name>${buildOptions.artifactId}</name>`,
46
- ` <description />`,
47
- ` <packaging>jar</packaging>`,
48
- ` <properties>`,
49
- ` <java.version>17</java.version>`,
50
- ` <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>`,
51
- ` <keycloak.version>23.0.0</keycloak.version>`,
52
- ` <guava.version>32.0.0-jre</guava.version>`,
53
- ` <lombok.version>1.18.28</lombok.version>`,
54
- ` <auto-service.version>1.1.1</auto-service.version>`,
55
- ` </properties>`,
56
- ` <build>`,
57
- ` <plugins>`,
58
- ` <plugin>`,
59
- ` <artifactId>maven-compiler-plugin</artifactId>`,
60
- ` <version>3.11.0</version>`,
61
- ` <configuration>`,
62
- ` <source>\${java.version}</source>`,
63
- ` <target>\${java.version}</target>`,
64
- ` <compilerArgument>-Xlint:unchecked</compilerArgument>`,
65
- ` <compilerArgument>-Xlint:deprecation</compilerArgument>`,
66
- ` <useIncrementalCompilation>false</useIncrementalCompilation>`,
67
- ` <annotationProcessorPaths>`,
68
- ` <path>`,
69
- ` <groupId>com.google.auto.service</groupId>`,
70
- ` <artifactId>auto-service</artifactId>`,
71
- ` <version>\${auto-service.version}</version>`,
72
- ` </path>`,
73
- ` <path>`,
74
- ` <groupId>org.projectlombok</groupId>`,
75
- ` <artifactId>lombok</artifactId>`,
76
- ` <version>\${lombok.version}</version>`,
77
- ` </path>`,
78
- ` </annotationProcessorPaths>`,
79
- ` </configuration>`,
80
- ` </plugin>`,
81
- ` <plugin>`,
82
- ` <groupId>org.apache.maven.plugins</groupId>`,
83
- ` <artifactId>maven-jar-plugin</artifactId>`,
84
- ` <version>3.2.0</version>`,
85
- ` <configuration>`,
86
- ` <archive>`,
87
- ` <manifestEntries>`,
88
- ` <Dependencies>`,
89
- ` <![CDATA[org.keycloak.keycloak-common,org.keycloak.keycloak-core,org.keycloak.keycloak-server-spi,org.keycloak.keycloak-server-spi-private,org.keycloak.keycloak-services,com.google.guava]]>`,
90
- ` </Dependencies>`,
91
- ` </manifestEntries>`,
92
- ` </archive>`,
93
- ` </configuration>`,
94
- ` </plugin>`,
95
- ` <plugin>`,
96
- ` <groupId>com.spotify.fmt</groupId>`,
97
- ` <artifactId>fmt-maven-plugin</artifactId>`,
98
- ` <version>2.20</version>`,
99
- ` </plugin>`,
100
- ` </plugins>`,
101
- ` </build>`,
102
- ` <dependencies>`,
103
- ` <dependency>`,
104
- ` <groupId>org.projectlombok</groupId>`,
105
- ` <artifactId>lombok</artifactId>`,
106
- ` <version>\${lombok.version}</version>`,
107
- ` <scope>provided</scope>`,
108
- ` </dependency>`,
109
- ` <dependency>`,
110
- ` <groupId>com.google.auto.service</groupId>`,
111
- ` <artifactId>auto-service</artifactId>`,
112
- ` <version>\${auto-service.version}</version>`,
113
- ` <scope>provided</scope>`,
114
- ` </dependency>`,
115
- ` <dependency>`,
116
- ` <groupId>org.keycloak</groupId>`,
117
- ` <artifactId>keycloak-server-spi</artifactId>`,
118
- ` <version>\${keycloak.version}</version>`,
119
- ` <scope>provided</scope>`,
120
- ` </dependency>`,
121
- ` <dependency>`,
122
- ` <groupId>org.keycloak</groupId>`,
123
- ` <artifactId>keycloak-server-spi-private</artifactId>`,
124
- ` <version>\${keycloak.version}</version>`,
125
- ` <scope>provided</scope>`,
126
- ` </dependency>`,
127
- ` <dependency>`,
128
- ` <groupId>org.keycloak</groupId>`,
129
- ` <artifactId>keycloak-services</artifactId>`,
130
- ` <version>\${keycloak.version}</version>`,
131
- ` <scope>provided</scope>`,
132
- ` </dependency>`,
133
- ` <dependency>`,
134
- ` <groupId>jakarta.ws.rs</groupId>`,
135
- ` <artifactId>jakarta.ws.rs-api</artifactId>`,
136
- ` <version>3.1.0</version>`,
137
- ` <scope>provided</scope>`,
138
- ` </dependency>`,
139
- ` <dependency>`,
140
- ` <groupId>com.google.guava</groupId>`,
141
- ` <artifactId>guava</artifactId>`,
142
- ` <version>\${guava.version}</version>`,
143
- ` <scope>provided</scope>`,
144
- ` </dependency>`,
145
- ` </dependencies>`,
46
+ ` <description />`,
47
+ ` <packaging>jar</packaging>`,
48
+ ` <properties>`,
49
+ ` <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>`,
50
+ ` </properties>`,
51
+ ` <build>`,
52
+ ` <plugins>`,
53
+ ` <plugin>`,
54
+ ` <groupId>org.apache.maven.plugins</groupId>`,
55
+ ` <artifactId>maven-shade-plugin</artifactId>`,
56
+ ` <version>3.5.1</version>`,
57
+ ` <executions>`,
58
+ ` <execution>`,
59
+ ` <phase>package</phase>`,
60
+ ` <goals>`,
61
+ ` <goal>shade</goal>`,
62
+ ` </goals>`,
63
+ ` </execution>`,
64
+ ` </executions>`,
65
+ ` </plugin>`,
66
+ ` </plugins>`,
67
+ ` </build>`,
68
+ ` <dependencies>`,
69
+ ` <dependency>`,
70
+ ` <groupId>io.phasetwo.keycloak</groupId>`,
71
+ ` <artifactId>keycloak-account-v1</artifactId>`,
72
+ ` <version>0.1</version>`,
73
+ ` </dependency>`,
74
+ ` </dependencies>`,
146
75
  `</project>`
147
76
  ].join("\n");
148
77
 
@@ -1,5 +1,5 @@
1
1
  import * as fs from "fs";
2
- import { join as pathJoin } from "path";
2
+ import { join as pathJoin, relative as pathRelative, basename as pathBasename } from "path";
3
3
  import { assert } from "tsafe/assert";
4
4
  import { Reflect } from "tsafe/Reflect";
5
5
  import type { BuildOptions } from "./BuildOptions";
@@ -19,8 +19,8 @@ generateStartKeycloakTestingContainer.basename = "start_keycloak_testing_contain
19
19
  const containerName = "keycloak-testing-container";
20
20
 
21
21
  /** Files for being able to run a hot reload keycloak container */
22
- export function generateStartKeycloakTestingContainer(params: { keycloakVersion: string; buildOptions: BuildOptionsLike }) {
23
- const { keycloakVersion, buildOptions } = params;
22
+ export function generateStartKeycloakTestingContainer(params: { jarFilePath: string; keycloakVersion: string; buildOptions: BuildOptionsLike }) {
23
+ const { jarFilePath, keycloakVersion, buildOptions } = params;
24
24
 
25
25
  const themeRelativeDirPath = pathJoin("src", "main", "resources", "theme");
26
26
  const themeDirPath = pathJoin(buildOptions.keycloakifyBuildDirPath, themeRelativeDirPath);
@@ -40,12 +40,19 @@ export function generateStartKeycloakTestingContainer(params: { keycloakVersion:
40
40
  ` --name ${containerName} \\`,
41
41
  " -e KEYCLOAK_ADMIN=admin \\",
42
42
  " -e KEYCLOAK_ADMIN_PASSWORD=admin \\",
43
+ ` -v "${pathJoin(
44
+ "$(pwd)",
45
+ pathRelative(buildOptions.keycloakifyBuildDirPath, jarFilePath)
46
+ )}":"/opt/keycloak/providers/${pathBasename(jarFilePath)}" \\`,
43
47
  ...fs
44
48
  .readdirSync(themeDirPath)
45
49
  .filter(name => fs.lstatSync(pathJoin(themeDirPath, name)).isDirectory())
46
50
  .map(
47
51
  themeName =>
48
- ` -v "${pathJoin(".", themeRelativeDirPath, themeName).replace(/\\/g, "/")}":"/opt/keycloak/themes/${themeName}":rw \\`
52
+ ` -v "${pathJoin("$(pwd)", themeRelativeDirPath, themeName).replace(
53
+ /\\/g,
54
+ "/"
55
+ )}":"/opt/keycloak/themes/${themeName}":rw \\`
49
56
  ),
50
57
  ` -it quay.io/keycloak/keycloak:${keycloakVersion} \\`,
51
58
  ` start-dev --features=declarative-user-profile`,
@@ -63,13 +63,14 @@ export async function main() {
63
63
  });
64
64
 
65
65
  if (buildOptions.doCreateJar) {
66
- child_process.execSync("mvn package", { "cwd": buildOptions.keycloakifyBuildDirPath });
66
+ child_process.execSync("mvn clean install", { "cwd": buildOptions.keycloakifyBuildDirPath });
67
67
  }
68
68
 
69
69
  const containerKeycloakVersion = "23.0.0";
70
70
 
71
71
  generateStartKeycloakTestingContainer({
72
72
  "keycloakVersion": containerKeycloakVersion,
73
+ jarFilePath,
73
74
  buildOptions
74
75
  });
75
76
 
@@ -82,6 +82,7 @@ export declare namespace KcContext {
82
82
  clientId: string;
83
83
  name?: string;
84
84
  description?: string;
85
+ attributes: Record<string, string>;
85
86
  };
86
87
  isAppInitiatedAction: boolean;
87
88
  messagesPerField: {
@@ -234,7 +234,8 @@ export const kcContextCommonMock: KcContext.Common = {
234
234
  "showTryAnotherWayLink": false
235
235
  },
236
236
  "client": {
237
- "clientId": "myApp"
237
+ "clientId": "myApp",
238
+ "attributes": {}
238
239
  },
239
240
  "scripts": [],
240
241
  "isAppInitiatedAction": false
@@ -314,7 +315,8 @@ export const kcContextMocks = [
314
315
  "actionUri": "#",
315
316
  "client": {
316
317
  "clientId": "myApp",
317
- "baseUrl": "#"
318
+ "baseUrl": "#",
319
+ "attributes": {}
318
320
  }
319
321
  }),
320
322
  id<KcContext.Error>({
@@ -322,7 +324,8 @@ export const kcContextMocks = [
322
324
  "pageId": "error.ftl",
323
325
  "client": {
324
326
  "clientId": "myApp",
325
- "baseUrl": "#"
327
+ "baseUrl": "#",
328
+ "attributes": {}
326
329
  },
327
330
  "message": {
328
331
  "type": "error",
@@ -496,7 +499,8 @@ export const kcContextMocks = [
496
499
  },
497
500
  "client": {
498
501
  "clientId": "myApp",
499
- "baseUrl": "#"
502
+ "baseUrl": "#",
503
+ "attributes": {}
500
504
  },
501
505
  "logoutConfirm": { "code": "123", skipLink: false }
502
506
  }),
@@ -1,12 +1,11 @@
1
1
  import { clsx } from "keycloakify/tools/clsx";
2
- import Template from "../Template";
3
2
  import { I18n } from "../i18n";
4
3
  import { KcContext } from "../kcContext";
5
4
  import { useGetClassName } from "../lib/useGetClassName";
6
5
  import { PageProps } from "./PageProps";
7
6
 
8
7
  export default function LoginOauthGrant(props: PageProps<Extract<KcContext, { pageId: "login-oauth2-device-verify-user-code.ftl" }>, I18n>) {
9
- const { kcContext, i18n, doUseDefaultCss, classes } = props;
8
+ const { kcContext, i18n, doUseDefaultCss, classes, Template } = props;
10
9
  const { url } = kcContext;
11
10
 
12
11
  const { msg, msgStr } = i18n;
@@ -2,11 +2,10 @@ import { clsx } from "keycloakify/tools/clsx";
2
2
  import { PageProps } from "./PageProps";
3
3
  import { KcContext } from "../kcContext";
4
4
  import { I18n } from "../i18n";
5
- import Template from "../Template";
6
5
  import { useGetClassName } from "keycloakify/login/lib/useGetClassName";
7
6
 
8
7
  export default function LoginOauthGrant(props: PageProps<Extract<KcContext, { pageId: "login-oauth-grant.ftl" }>, I18n>) {
9
- const { kcContext, i18n, doUseDefaultCss, classes } = props;
8
+ const { kcContext, i18n, doUseDefaultCss, classes, Template } = props;
10
9
  const { url, oauth, client } = kcContext;
11
10
 
12
11
  const { msg, msgStr, advancedMsg, advancedMsgStr } = i18n;
@@ -1,33 +0,0 @@
1
- /*
2
- * Copyright 2016 Red Hat, Inc. and/or its affiliates
3
- * and other contributors as indicated by the @author tags.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- package org.keycloak.forms.account;
19
-
20
- /**
21
- * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
22
- */
23
- public enum AccountPages {
24
- ACCOUNT,
25
- PASSWORD,
26
- TOTP,
27
- FEDERATED_IDENTITY,
28
- LOG,
29
- SESSIONS,
30
- APPLICATIONS,
31
- RESOURCES,
32
- RESOURCE_DETAIL;
33
- }
@@ -1,76 +0,0 @@
1
- /*
2
- * Copyright 2016 Red Hat, Inc. and/or its affiliates
3
- * and other contributors as indicated by the @author tags.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- package org.keycloak.forms.account;
19
-
20
- import jakarta.ws.rs.core.HttpHeaders;
21
- import jakarta.ws.rs.core.MultivaluedMap;
22
- import jakarta.ws.rs.core.Response;
23
- import jakarta.ws.rs.core.UriInfo;
24
- import java.util.List;
25
- import org.keycloak.events.Event;
26
- import org.keycloak.models.RealmModel;
27
- import org.keycloak.models.UserModel;
28
- import org.keycloak.models.UserSessionModel;
29
- import org.keycloak.models.utils.FormMessage;
30
- import org.keycloak.provider.Provider;
31
-
32
- /**
33
- * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
34
- */
35
- public interface AccountProvider extends Provider {
36
-
37
- AccountProvider setUriInfo(UriInfo uriInfo);
38
-
39
- AccountProvider setHttpHeaders(HttpHeaders httpHeaders);
40
-
41
- Response createResponse(AccountPages page);
42
-
43
- AccountProvider setError(Response.Status status, String message, Object... parameters);
44
-
45
- AccountProvider setErrors(Response.Status status, List<FormMessage> messages);
46
-
47
- AccountProvider setSuccess(String message, Object... parameters);
48
-
49
- AccountProvider setWarning(String message, Object... parameters);
50
-
51
- AccountProvider setUser(UserModel user);
52
-
53
- AccountProvider setProfileFormData(MultivaluedMap<String, String> formData);
54
-
55
- AccountProvider setRealm(RealmModel realm);
56
-
57
- AccountProvider setReferrer(String[] referrer);
58
-
59
- AccountProvider setEvents(List<Event> events);
60
-
61
- AccountProvider setSessions(List<UserSessionModel> sessions);
62
-
63
- AccountProvider setPasswordSet(boolean passwordSet);
64
-
65
- AccountProvider setStateChecker(String stateChecker);
66
-
67
- AccountProvider setIdTokenHint(String idTokenHint);
68
-
69
- AccountProvider setFeatures(
70
- boolean social,
71
- boolean events,
72
- boolean passwordUpdateSupported,
73
- boolean authorizationSupported);
74
-
75
- AccountProvider setAttribute(String key, String value);
76
- }
@@ -1,25 +0,0 @@
1
- /*
2
- * Copyright 2016 Red Hat, Inc. and/or its affiliates
3
- * and other contributors as indicated by the @author tags.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- package org.keycloak.forms.account;
19
-
20
- import org.keycloak.provider.ProviderFactory;
21
-
22
- /**
23
- * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
24
- */
25
- public interface AccountProviderFactory extends ProviderFactory<AccountProvider> {}
@@ -1,50 +0,0 @@
1
- /*
2
- * Copyright 2016 Red Hat, Inc. and/or its affiliates
3
- * and other contributors as indicated by the @author tags.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- package org.keycloak.forms.account;
19
-
20
- import com.google.auto.service.AutoService;
21
- import org.keycloak.provider.Provider;
22
- import org.keycloak.provider.ProviderFactory;
23
- import org.keycloak.provider.Spi;
24
-
25
- /**
26
- * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
27
- */
28
- @AutoService(Spi.class)
29
- public class AccountSpi implements Spi {
30
-
31
- @Override
32
- public boolean isInternal() {
33
- return true;
34
- }
35
-
36
- @Override
37
- public String getName() {
38
- return "account";
39
- }
40
-
41
- @Override
42
- public Class<? extends Provider> getProviderClass() {
43
- return AccountProvider.class;
44
- }
45
-
46
- @Override
47
- public Class<? extends ProviderFactory> getProviderFactoryClass() {
48
- return AccountProviderFactory.class;
49
- }
50
- }