auth
auth/sql/postgres_empty.sql
Clean up sessions and tokens after Profile is deleted. Add a terminateSessionsByProfile method to our sessionStore to mark Sessions associated with a Profile as inactive. Implement memstore and postgres implementations of the terminateSessionsByProfile method. Add a TerminateSessionsByProfile wrapper method to Context. Add a revokeTokensByProfileID method to our tokenStore to mark Tokens associated with a Profile as revoked. Implement memstore and postgres implementation of the revokeTokensByProfileID method. Add a RevokeTokensByProfileID wrapper method to Context. Call our RevokeTokensByProfileID and TerminateSessionsByProfile methods after a Profile is deleted, to clean up the Tokens and Sessions associated with it.
| paddy@155 | 1 TRUNCATE profiles; |
| paddy@155 | 2 TRUNCATE logins; |
| paddy@155 | 3 TRUNCATE clients; |
| paddy@155 | 4 TRUNCATE endpoints; |
| paddy@155 | 5 TRUNCATE scopes; |
| paddy@155 | 6 TRUNCATE sessions; |
| paddy@155 | 7 TRUNCATE tokens; |
| paddy@155 | 8 TRUNCATE scopes_tokens; |
| paddy@156 | 9 TRUNCATE authorization_codes; |
| paddy@156 | 10 TRUNCATE authorization_codes_scopes; |