groton-school / slim-oauth2-api-proxy-gae-repository
Firestore access token repository for Slim OAuth2 API proxy running on Google App Engine
Installs: 103
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/groton-school/slim-oauth2-api-proxy-gae-repository
Requires
- google/cloud-firestore: ^1.53
- groton-school/slim-oauth2-api-proxy: ^3.0.1
- psr/http-message: ^2.0
Requires (Dev)
README
Firestore access token repository for Slim OAuth2 API proxy running on Google App Engine
Install
composer require groton-school/oauth2-api-proxy-gae-repository
Use
This is an alternative to the default browser cookie storage for groton-school/oauth2-api-proxy, with the advantage that when used in an embedded context (e.g. an LTI placement) with partitioned cookies, users will not need to reauthorize the API access nearly as frequently.
- Implement
AbstractUserIdentifierMiddleware
, creating a globally unique user identifier for any given request - Configure
Firestore\AccessTokenRepository
for a given Provider independencies.php
- Inject the
AbstractUserIdentifierMiddleware
implementation into theRouteBuilder::define()
call. (In the linked example, theApiProxyUserIdentifier
depends on data that must be provided byAuthenticated
first, andPartitionedSession
is invoked last/outer because we are in an embedded LTI placement context).