Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This design would allow us to support other OAuth "Authorization Code Grant" providers in the future.

...

OAuthService

MethodDescription
OAuthAccessToken requestAccessToken(OAuthAuthorizationToken authToken) : OAuthAccessTokenretrieves the access token, making the necessary requests to the OAuth provider to refresh or whatever
ForwardCursorPagedResourceList<String> getHealthCodesGrantingAccess(StudyIdentifier studyId, String vendorIdentifier, int pageSize, String offsetKey) : ForwardCursorPagedResourceList<String>retrieve all the health codes for accounts that have granted access to the OAuth provider at some point. They should all have refresh tokens and access tokens.
OAuthAccessToken getAccessToken(StudyIdentifier studyId, String vendorIdentifier, String healthCode) : OAuthAccessTokenretrieves an access token for the individual health code, making the necessary requests to the OAuth provider to refresh or whatever.

...

OAuthAccessGrant
String studyId:vendor (hashKey)
String healthCode (rangeKey)
String accessToken
String refreshToken
Long createdOn
Long expiresOn


OAuthAccessToken
String vendorId
String accessToken
DateTime expiresOn


OAuthAuthorizationToken

String vendorId
String authToken

...