agusnavce / keycloak_example Goto Github PK
View Code? Open in Web Editor NEWExample app that uses Keycloak for authentication
Example app that uses Keycloak for authentication
Great article, where is the auth
decorator on the endpoints imported from?
https://github.com/agusnavce/keycloak_example/blob/master/api/run.py#L67
can I know which keycloak version you were using ?
$ docker-compose build --no-cache
WARNING: The DATABASE_USER variable is not set. Defaulting to a blank string.
WARNING: The DATABASE_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The KEYCLOAK_USER variable is not set. Defaulting to a blank string.
WARNING: The KEYCLOAK_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The REALM variable is not set. Defaulting to a blank string.
WARNING: The CLIENT_ID variable is not set. Defaulting to a blank string.
WARNING: The CLIENT_SECRET variable is not set. Defaulting to a blank string.
WARNING: The ADMIN_USER variable is not set. Defaulting to a blank string.
WARNING: The ADMIN_PASS variable is not set. Defaulting to a blank string.
postgres uses an image, skipping
keycloak uses an image, skipping
Building api
Step 1/8 : FROM ubuntu:latest
---> f63181f19b2f
Step 2/8 : RUN apt-get update -y
---> Running in e401fb966b9a
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [651 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [177 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [29.6 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [209 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [934 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1060 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [4301 B]
Get:16 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [671 kB]
Get:17 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [21.6 kB]
Fetched 17.2 MB in 5s (3601 kB/s)
Reading package lists...
Removing intermediate container e401fb966b9a
---> adaacab8f759
Step 3/8 : RUN apt-get install -y python-pip python-dev build-essential
---> Running in ddb5657f5c6d
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package python-pip
ERROR: Service 'api' failed to build : The command '/bin/sh -c apt-get install -y python-pip python-dev build-essential' returned a non-zero code: 100
=========== Other install issue =================
/bin/sh: 1: pip: not found
ERROR: Service 'api' failed to build : The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 127
=========== Other install issue =================
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
ERROR: Service 'api' failed to build : The command '/bin/sh -c pip3 install -r requirements.txt' returned a non-zero code: 1
there are way too many errors in this!
what is the auth.route decorator at line 67
you imports are just all over the place!
you have used requests without importing it!
traceback is not imported as well
what in the name of god is "KeycloakAdminTokenError" at line 157?
The Dockerfile in /api refers to requirements.txt:
RUN pip install -r requirements.txt
But that file does not exist.
$ docker-compose up -d
WARNING: The DATABASE_USER variable is not set. Defaulting to a blank string.
WARNING: The DATABASE_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The KEYCLOAK_USER variable is not set. Defaulting to a blank string.
WARNING: The KEYCLOAK_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The REALM variable is not set. Defaulting to a blank string.
WARNING: The CLIENT_ID variable is not set. Defaulting to a blank string.
WARNING: The CLIENT_SECRET variable is not set. Defaulting to a blank string.
WARNING: The ADMIN_USER variable is not set. Defaulting to a blank string.
WARNING: The ADMIN_PASS variable is not set. Defaulting to a blank string.
ERROR: Service "api" uses an undefined network "gerdau"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.