This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OAuth (Open Authentication) | |
OAuth Client - e.g. My Server | |
OAuth Provider - e.g. Facebook Server | |
1. Register the OAuth Client on the OAuth Provider | |
2. It gets back an Client ID and a Client Secret | |
(On FB you do this manually by creating a developer account) | |
3. We want to authorize a user via the OAuth Provider | |
We send to "GET: provider.com/oauth/authorize?" with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
JPA (Java Persistence API) | |
Transaction Management with an Entity-Mananger: | |
--- | |
entityManager.getTransaction().begin(); | |
entityManager.persist(<some-entity>); | |
entityManager.getTransaction().commit(); | |
entityManager.clear(); |