Comments (5)
You cannot put your jar into the standalone/deployments
folder, it's called hot deployment. you need to register it using Modules. Or you can take at look at my example Dockerfile.
My example Dockerfile:
# base image
FROM jboss/keycloak:9.0.2
# copy the jars into the current folder
COPY --from=builder /app/keycloak-phone-authenticator/target/keycloak-phone-authenticator-1.0.0-SNAPSHOT.jar .
COPY --from=builder /app/keycloak-phone-authenticator-yuntongxun-sms/target/keycloak-phone-authenticator-yuntongxun-sms-1.0.0-SNAPSHOT.jar .
COPY --from=builder /app/yuntongxun4j/target/yuntongxun4j-1.0-SNAPSHOT.jar .
COPY examples/cli/ cli/
# register the jars
RUN $JBOSS_HOME/bin/jboss-cli.sh --file=cli/keycloak-phone-authenticator-yuntongxun-sms-config.cli
RUN $JBOSS_HOME/bin/jboss-cli.sh --file=cli/module-add.cli
# copy the resource files into the current folder
COPY --from=builder /app/keycloak-phone-authenticator/target/classes/theme-resources/templates/ $JBOSS_HOME/themes/base/login/
COPY ./messages/ messages/
# fix a bug
RUN rm -rf /opt/jboss/keycloak/standalone/configuration/standalone_xml_history/current
# register the resource files
RUN cat messages/messages_en.properties >> $JBOSS_HOME/themes/base/login/messages/messages_en.properties && \
cat messages/messages_zh_CN.properties >> $JBOSS_HOME/themes/base/login/messages/messages_zh_CN.properties && \
cat messages/messages_en.properties >> $JBOSS_HOME/themes/base/account/messages/messages_en.properties && \
cat messages/messages_zh_CN.properties >> $JBOSS_HOME/themes/base/account/messages/messages_zh_CN.properties
#6 is related to this and can answer your questions.
from keycloak-phone-authenticator.
Thank you for the instant response!
Seems I managed to adapt Dockerfile to my Keycloak setup, but on user login page An internal server error has occurred
message shown and Keycloak outputs to console:
| 12:44:41,754 ERROR [freemarker.runtime] (default task-2) Error executing FreeMarker template: freemarker.core._MiscTemplateException: Macro "registrationLayout" has no parameter with name "displayWide".
|
| ----
| FTL stack trace ("~" means nesting-related):
| - Failed at: #macro registrationLayout bodyClass="... [in template "template.ftl" in macro "registrationLayout" at line 1, column 1]
| - Reached through: @layout.registrationLayout displayInf... [in template "login-with-phone.ftl" at line 2, column 1]
| ----
| at [email protected]//freemarker.core.Environment.setMacroContextLocalsFromArguments(Environment.java:921)
| at [email protected]//freemarker.core.Environment.invokeMacroOrFunctionCommonPart(Environment.java:854)
| at [email protected]//freemarker.core.Environment.invokeMacro(Environment.java:809)
| at [email protected]//freemarker.core.UnifiedCall.accept(UnifiedCall.java:83)
| at [email protected]//freemarker.core.Environment.visit(Environment.java:331)
| ...
I have everything set up for version keycloak/keycloak:13.0.0
. Maybe keycloak-phone-authenticator
not supposed to work with version 13? Or I am doing something wrong? Thanks in advance.
from keycloak-phone-authenticator.
I haven't tried this with Keycloak 13. When I tried to build keycloak 13.0.1 locally, I got some errors like this. Hmmm... I haven't fixed it, let me try it tomorrow.
from keycloak-phone-authenticator.
Hi, I just released a new version to support Keycloak 13. Could you please test if it solves your problems? Let me know if anything wrong. thank you.
from keycloak-phone-authenticator.
It worked! Thank you very much!
from keycloak-phone-authenticator.
Related Issues (10)
- java.lang.NoClassDefFoundError: Failed to link com/hfx/keycloak/spi/ResetCredentialWithPhone HOT 10
- Unable to build Hibernate SessionFactory HOT 2
- How do I set up Direct grant flow? HOT 4
- Server fail to start after coping jar in provider folder HOT 1
- 怎样通过验证码和电话号通过rest api 登录并得到 oauth access token 呢? HOT 1
- Unable to start up Keycloak server after adding jar file
- Failed to link com/hfx/keycloak/spi/ResetCredentialWithPhone HOT 6
- How To Access VerificationCode table if I already have an external db setup? HOT 2
- Use Phone Authenticator Form For User Authentication And Registration HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keycloak-phone-authenticator.