I'm trying to implement WebSocket support with Angular+SockJs on front-end, and Spring on backend. We are using Spring Security with OAuth 2.0 token based authorization. Spec tell us that i should pass token via STOMP client at connect time and use Interceptor on backend to provide Principal. But i don't like this approach because i need to copy logic from Security configuration to get Principal from Token. Is it possible to catch SockJs request in Angular Interceptor and add Authentication header?
Secure WebSocket with Spring Security OAuth 2.0, AngularJS and SockJs
741 views Asked by Tolledo At
0
There are 0 answers
Related Questions in ANGULARJS
- How to automatically change path in angular when scrolling
- Error two clicks to be able to login Angular 16
- Passing an array of objects through the $http.post method in angular JS does not work
- Understanding how to apply Angular Signals from beginning on an existing service
- provider duplicate while compiling a Cordova application for the Android platform
- How can I use angularjs $parse service in Angular?
- Width of custom headers in ag-grid (angular) doesn't match with column's width
- Issues with Katex/ngx-markdown Rendering in Angular 16
- How to make Angular SSR wait for async operations to finish that are initiated in ngOnInit?
- I want to install @angular/google-maps npm Package in angular 16.2.12 but "npm install @angular/google-maps" this is not working/ tell me other query
- Angular 17 standalone application integrate CKEditor 5 -- Error: window is not defined
- Why is $scope >= 0 showing true in interpolation while empty in controller?
- The XMLHttpRequest compatibility library was not found
- Making Gantt Chart Column Labels More Readable
- Pass key-value pairs of object as individual arguments to component in Angular
Related Questions in SPRING-SECURITY
- How do I propagate the current SecurityContext to my @RabbitListener in Spring Boot?
- Spring security causing 404 with message "No static resource login"
- Spring JPA Data Auditing - How to design it?
- Spring 3 - Security: How to rebuild authManager () usage?
- Error: Cannot invoke "jakarta.servlet.http.HttpSession.getAttribute(String)" because "session" is null
- how to use ldap authentication with permission taken from db without needing password in UserDetails
- This error occurred when using springsecurity for database user verification: IllegalArgumentException
- Issue with configuring SpringSecurity to allow URLs in FilterChain
- getting React Hook "useSetupInterceptors" cannot be called at the top level when try to use useSignOut hook
- Spring Authorization Server `JdbcOAuth2AuthorizationService` does not save custom User object
- Customize Authorization Code claims with Spring OAuth2 Authorization Server 3.2.4
- Spring Security Reactive OAuth2 Client: Options for Customizing Refresh Endpoint
- Repository injection in an handler spring boot class performance
- Spring Security mix form based and http basic authentication
- SecurityContextHolder.getContext().getAuthentication() is null
Related Questions in SPRING-WEBSOCKET
- When i reload or logout from my app the disconnect function in the backend runs twice and i am getting two session different ids when logging out
- Websocket duplicate on headers
- Spring boot websocket chat(stomp) receive function didnt works
- The frontend is not updating when there is an update in backend. For real time updates I am using Websockets
- Java WebSocket client memory leak
- React Native and WebSocket communication - StompJS will not connect for me, alternatives?
- Having problem with sending message to the Client-Side
- CORS issues when connecting to a WebSocket for SpringBoot + React projects
- How to find all subscribed clients to a web socket destination in spring boot?
- Unable to hit the websocket endpoint from frontend
- Websocket Connected and Subscribbed, but clients are not recieved messages from server
- Extract data from the application
- StompEndpoint NullPointerException Error on Unit Testing
- SpringBoot app terminated immediately after establishing connection via Websocket
- SpringBoot and Mybatis-plus andWebsocket Qusetion
Related Questions in SOCKJS
- When i reload or logout from my app the disconnect function in the backend runs twice and i am getting two session different ids when logging out
- Having problem with sending message to the Client-Side
- Error Resolving 'sockjs-client' and 'stompjs' in React and Spring Data Rest Project
- How can i fix 404 error of StompJS + WebSocket first "info"connect?
- Spring websocket issues
- React Stomp SockJsClient failed to connect and get a connection has not been established yet
- Spring WebSocket and React SockJS Connection Issues
- SockJS with Angular does not display the messages
- React Vite + SockJS Client All transports failed
- Java Spring Web Socket With STOMP & Sock JS Facing Issue With Proxy
- Uncaught (in promise) TypeError: this._sockJS is not a constructor in my vue 3 vite application
- Blocked by CORS policy - wildcard '*' and withCredentials is true
- springboot stomp send heart beat to closed session lead to error “No converter for [class java.util.LinkedHashMap] ...”
- How to connect web sockets between Spring Boot and Angular with Spring Security?
- Send to specific user does not work Java Spring WebSockets for Sending Notifications
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)