Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jehiah committed Jul 3, 2015
1 parent 16ea5e4 commit d40bd92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions oauthproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ func (p *OauthProxy) LoadCookiedSession(req *http.Request) (*providers.SessionSt

age = time.Now().Truncate(time.Second).Sub(timestamp)
return session, age, nil

}

func (p *OauthProxy) SaveSession(rw http.ResponseWriter, req *http.Request, s *providers.SessionState) error {
Expand Down Expand Up @@ -484,8 +483,8 @@ func (p *OauthProxy) Proxy(rw http.ResponseWriter, req *http.Request) {
clearSession = true
}
}
if saveSession && session.Email != "" && !p.Validator(session.Email){

if saveSession && session.Email != "" && !p.Validator(session.Email) {
log.Printf("%s Permission Denied: removing session %s", remoteAddr, session)
session = nil
saveSession = false
Expand Down
2 changes: 1 addition & 1 deletion providers/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (p *GoogleProvider) Redeem(redirectUrl, code string) (s *SessionState, err

func (p *GoogleProvider) RefreshSessionIfNeeded(s *SessionState) (bool, error) {
if s == nil || s.ExpiresOn.After(time.Now()) || s.RefreshToken == "" {
return false, nil
return false, nil
}

newToken, duration, err := p.redeemRefreshToken(s.RefreshToken)
Expand Down

0 comments on commit d40bd92

Please sign in to comment.