You canlook at how to implement and configure WebSocket security. The security that you will implement is basic security for the GlassFish server. The way security is implemented may vary and depends on the server that you have chosen to use, however the basic concept should be same (or at least very similar) regardless of the server specifics. At the end of this video the chat application will ask for a username and password which it will authenticate.
- [Instructor] We're going to implement…basic authentication so that a username and a password…must be entered in order to access the client application.…We need to amend two files…the deployment descriptor which is the web.xml file…and the pom.xml file.…Okay, so you need to open the deployment descriptor.…This is located in the web app directory under WEB-INF.…I already have it open on my screen.…Also, go to consensus configure between…the security constraint elements.…So let's add these to start.…
So we're just going to enter security constraints like so.…Now within these elements we define the web resource.…This is where we specify the pattern of the url…to be protected and the http method.…The url path will be the path to the chat url.…So in this case it will be just /rooms/*.…Now the * matches any path after the room's route.…This means that a request to any room will…be caught by this template and security constraints…will be applied.…
So let's type that in.…So for the web resource,…we're just gonna enter the name Chat Endpoint.…
Join Alex Theedom as he guides you through the lifecycle of a WebSocket connection, and discusses the Java EE WebSocket programming methodologies: annotation and programmatic. He shows how to secure and encrypt WebSocket endpoints and use simple techniques to test their implementation. In addition, he explains how to integrate the JSON-processing API and build a front-end and server based WebSocket client.
- WebSocket usage
- WebSocket lifecycle and topology
- WebSocket front end and back end
- WebSocket methodologies
- Annotation methodology and programmatic methodology
- Coding a client API
- Using the JSON Processing API
- Coding the encoder and decoder
- Building the front end
- Testing WebSocket endpoints
Skill Level Intermediate
Java Platforms Compared: SE vs EE vs MEwith Peggy Fisher25m 38s Intermediate
1. Introduction to WebSocket
2. WebSockets Front End and Back End
3. Project Application and Structure
4. Java EE WebSocket API
5. Messages and Encoding
6. Build Web Front End
7. WebSocket Security
8. Testing WebSocket Endpoints
Next steps1m 37s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.