Comments (4)
@csarn , thank you for the issue. I will respond in full when I get off mobile. Meanwhile, please try this and see the diff.
{
http_port 8080
admin off
debug
}
*:8080 {
@localhost host localhost
handle @localhost {
route /auth* {
authp {
crypto default token lifetime 3600
crypto key sign-verify 0e2fdcf8-6868-41a7-884b-7308795fc286
backend local users.json local
cookie insecure on
# add user transform and add a link
ui {
links {
"My Website" / "las la-star"
"My Identity" "/auth/whoami" icon "las la-star"
}
}
transform user {
match origin local
action add role authp/user
}
transform user {
match origin local
match roles authp/user
ui link "Portal Settings" /auth/settings icon "las la-code-branch"
}
}
}
route /* {
authorize {
primary yes
crypto key verify 0e2fdcf8-6868-41a7-884b-7308795fc286
}
respond "auth"
}
route {
redir http://{hostport}/auth 302
}
}
}
from authcrunch.github.io.
Thanks for the quick reply!
Your configuration didn't work out of the box, but I got it to work after some modification (modifying backend, ui links, adding acl):
{
http_port 8080
admin off
debug
}
*:8080 {
@localhost host localhost
handle @localhost {
route /auth* {
authp {
crypto default token lifetime 3600
crypto key sign-verify 0e2fdcf8-6868-41a7-884b-7308795fc286
backends {
local_backend {
method local
path users.json
realm local
}
}
cookie insecure on
# add user transform and add a link
ui {
links {
"My Website" /
"My Identity" "/auth/whoami"
}
}
transform user {
match origin local
action add role authp/user
}
transform user {
match origin local
match roles authp/user
ui link "Portal Settings" /auth/settings
}
}
}
route /* {
authorize {
primary yes
acl rule {
match roles authp/user
allow stop counter log debug
}
crypto key verify 0e2fdcf8-6868-41a7-884b-7308795fc286
}
respond "auth"
}
route {
redir http://{hostport}/auth 302
}
}
}
Is my first configuration still indicating a bug? I guess an error message would be better than a panic, so I'll leave this open :)
from authcrunch.github.io.
Is my first configuration still indicating a bug? I guess an error message would be better than a panic, so I'll leave this open :)
I think this is the intended behavior. There is no way for the plugin instance to know if it is the only one in the config. Further, the plugin instance also does not know about any other parts of the config, because it is being isolated by design. Thus, the primary yes
is necessary.
from authcrunch.github.io.
@csarn , also use caddy fmt -overwrite path/to/Caddyfile
to format your Caddyfiles.
from authcrunch.github.io.
Related Issues (20)
- whoami: document beacon and id_token
- oauth: document enable logout directive
- ui: document meta author and description
- messaging: document file provider
- ldap: document fallback role directive
- ui: setting page directives
- document aws saml login HOT 3
- Azure OIDC Expired Tokens Redirect URL Issue HOT 2
- keycloak no id_token HOT 17
- keycloak in the same Caddyfile HOT 1
- Build fails with Docker and xcaddy HOT 1
- How does authp interact with the acme challenge URLs? HOT 2
- Allow both unauthenticated and authenticated access HOT 1
- Unable to register new user without email verification. HOT 3
- fail to send mail to smtp-mail.outlook.com HOT 1
- google oauth: send "prompt" query param HOT 1
- Successful Oauth Login Immediately Redirects HOT 4
- Feature request: automaticaly activate newly self-registered users HOT 2
- Feature request: store users in database HOT 1
- Unable to type password HOT 11
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 authcrunch.github.io.