Skip to content

Instantly share code, notes, and snippets.

@staticpix
staticpix / oauth-cheetsheet.txt
Created December 8, 2020 18:08 — forked from jahe/oauth-cheetsheet.txt
OAuth Cheatsheet
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
@staticpix
staticpix / jpa-cheatsheet.java
Created December 8, 2020 18:08 — forked from jahe/jpa-cheatsheet.java
JPA Cheatsheet
/*
JPA (Java Persistence API)
Transaction Management with an Entity-Mananger:
---
entityManager.getTransaction().begin();
entityManager.persist(<some-entity>);
entityManager.getTransaction().commit();
entityManager.clear();