Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/virgilsecurity/demo-e2ee-server-java
A simple Java server application that uses in end-to-end encryption (E2EE) use-case.
https://github.com/virgilsecurity/demo-e2ee-server-java
crypto cryptography demo encryption end-to-end-encryption secured-by-virgil server
Last synced: 19 days ago
JSON representation
A simple Java server application that uses in end-to-end encryption (E2EE) use-case.
- Host: GitHub
- URL: https://github.com/virgilsecurity/demo-e2ee-server-java
- Owner: VirgilSecurity
- License: other
- Created: 2018-03-28T08:58:19.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-17T16:03:59.000Z (almost 7 years ago)
- Last Synced: 2024-11-09T12:29:04.681Z (2 months ago)
- Topics: crypto, cryptography, demo, encryption, end-to-end-encryption, secured-by-virgil, server
- Language: Java
- Homepage: https://developer.virgilsecurity.com/docs/java/use-cases/v4/encrypted-communication
- Size: 85.9 KB
- Stars: 1
- Watchers: 23
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# e2ee-server-java
A simple java server application that uses in end-to-end encryption use-case.# Prerequisites
* Java Development Kit (JDK) 9+
* Gradle 4.4+# ! All info below is OUTDATED
# Configuration
## Create Google application
Go to [Developer Console](https://console.developers.google.com)
Register oAuth 2.0 client## Configure application
Define system variables
```
SECURITY_OAUTH2_CLIENT_CLIENTID=
SECURITY_OAUTH2_CLIENT_CLIENTSECRET=
```# Authentication
Use [oAuth 2.0](https://tools.ietf.org/html/rfc6749) to authenticate user. After login user session created. `JSESSIONID` cookie used as a session identifier.
# REST endpoints
## Current user details
**Request info**
```
HTTP Request method GET
Request URL /user
Authentication Optional
```# WebSocket
The endpoint for WebSocket connection is `/websocket`.## Destinations
### Update active users list
Send message to server if you need to refresh users list manually.
```
/users
```### Send a message
```
/message
```
Message sent by a client could be received by active clients only.*Message body*
```json
{
"body": "The text of a message"
}
```## Topics
### Active users
```
/topic/activeusers
```
Server sends a list of active users automatically every time when client connects/disconnects to server. To receive this messages client should subscribed to the topic.*Message body*
```json
[
{
"name" : "User1 name",
"email": "User1 email"
},
{
"name" : "User2 name",
"email": "User2 email"
}
...
]
```### Receive a message
```
/topic/messages
```
Once client sends a message, this message will be received by all active clients including sender.*Message body*
```json
{
"author":"User1 name",
"body":"The text of a message"
}
```