Comments (8)
Not so fast @straumat! : -)
Maybe it is not the correct approach to throw AuthenticationException
or AuthenticationServiceException
.
It might be that SessionAuthenticationException
is better or not throwing an exception at all!
I will read into it and close the ticket only when a suitable solution has been found!
Thank you @straumat 🙏
You really help me a lot with your insights!
from bitcoin-spring-boot-starter.
Ok! it now works!
from bitcoin-spring-boot-starter.
Hey @straumat!
I was wondering why the browser does not poll with the same k1
value as seen in your logs..
The problem is in your exception handling:
// If the user is not authenticated when accessing a protected page, redirect to the login page.
.exceptionHandling((exceptionHandling) -> exceptionHandling
.accessDeniedPage(ERROR_403_PAGE)
.authenticationEntryPoint((request, response, authenticationException) -> response.sendRedirect(LNURL_AUTH_LOGIN_PAGE_PATH))
)
When a user polls the session migration endpoint, it will throw an exception if the user has not been paired with a linking key.
In your setup, this will "redirect" the user to the login page again, creating a new k1
, repeating this over and over again.
I do not know if the session migration endpoint breaks any spring-security contracts by throwing an exception.. maybe it should just return an error by returning a proper http status? What do you think?
from bitcoin-spring-boot-starter.
Hi :) Ok, I had a bug in findPairedLinkingKeyByK1
, it works now, I can log in :) Thx !
I will move to the new pairK1WithLinkingKey
and write the blog post.
You can close this issue and thx again
from bitcoin-spring-boot-starter.
For information, with the develop release, this doesn't work anymore:
// If the user is not authenticated when accessing a protected page, redirect to the login page.
.exceptionHandling((exceptionHandling) -> exceptionHandling
.accessDeniedPage(ERROR_403_PAGE)
.authenticationEntryPoint((request, response, authenticationException) -> response.sendRedirect(LNURL_AUTH_LOGIN_PAGE_PATH))
)
from bitcoin-spring-boot-starter.
For information, with the develop release, this doesn't work anymore:
// If the user is not authenticated when accessing a protected page, redirect to the login page. .exceptionHandling((exceptionHandling) -> exceptionHandling .accessDeniedPage(ERROR_403_PAGE) .authenticationEntryPoint((request, response, authenticationException) -> response.sendRedirect(LNURL_AUTH_LOGIN_PAGE_PATH)) )
What do you mean, it does not work anymore?
from bitcoin-spring-boot-starter.
with 0.12, I could login with that code.
with develop, i have to comment to login
from bitcoin-spring-boot-starter.
with 0.12, I could login with that code. with develop, i have to comment to login
Hmm.. I do not think so.. it should have never worked -> #116 (comment)
from bitcoin-spring-boot-starter.
Related Issues (20)
- feat: expose port and network for bitcoin testcontainer HOT 8
- bug: Unique constraint error in payment request example app
- cln: add actuator endpoints
- cln: add ssl context to auto config
- build: re-enable configureondemand and parallel when building
- feat: externalize module `cln-grpc-client`
- Use `spring-boot-docker-compose` in example apps
- make upstream dependencies in autoconfigure modules optional
- remove use of deprecated property `server.use-forward-headers` in example apps
- Not able to build with Java 20 HOT 3
- Lnurl auth problem with latest Spring Boot HOT 3
- Debug message not clear in InMemoryK1Cache HOT 8
- Error when only adding the dependency HOT 1
- Questions about how lnurl-auth impl works HOT 4
- SimpleLinkingKey not found when used in spring boot starter. HOT 9
- feat: add `bitcoin-blended-fee-estimator` fee module
- Using SNAPSHOT release HOT 2
- Blog post review HOT 1
- ClassCastException when using @AuthenticationPrincipal HOT 2
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 bitcoin-spring-boot-starter.