back interdiff of round #1 and #0

appview: oauth: swap out db store for redis cache #212

merged
opened by anirudh.fi targeting master from push-ruoqnsmttnxx
files
appview
cache
session
oauth
state
ERROR
appview/oauth/handler/handler.go

Failed to calculate interdiff for this file.

ERROR
appview/oauth/oauth.go

Failed to calculate interdiff for this file.

ERROR
appview/state/router.go

Failed to calculate interdiff for this file.

ERROR
appview/state/state.go

Failed to calculate interdiff for this file.

NEW
appview/cache/session/store.go
···
}
func (s *SessionStore) GetRequestByState(ctx context.Context, state string) (*OAuthRequest, error) {
-
didKey, err := s.getRequestKey(ctx, state)
if err != nil {
return nil, err
}
···
}
func (s *SessionStore) DeleteRequestByState(ctx context.Context, state string) error {
-
didKey, err := s.getRequestKey(ctx, state)
if err != nil {
return err
}
-
err = s.cache.Del(ctx, fmt.Sprintf(stateKey, "state")).Err()
if err != nil {
return err
}
···
}
func (s *SessionStore) GetRequestByState(ctx context.Context, state string) (*OAuthRequest, error) {
+
didKey, err := s.getRequestKeyFromState(ctx, state)
if err != nil {
return nil, err
}
···
}
func (s *SessionStore) DeleteRequestByState(ctx context.Context, state string) error {
+
didKey, err := s.getRequestKeyFromState(ctx, state)
if err != nil {
return err
}
+
err = s.cache.Del(ctx, fmt.Sprintf(stateKey, state)).Err()
if err != nil {
return err
}