remove race condition
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
parent
010f41eefa
commit
caab666767
1 changed files with 4 additions and 6 deletions
|
@ -166,9 +166,6 @@ func (rp *relyingParty) ErrorHandler() func(http.ResponseWriter, *http.Request,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rp *relyingParty) UnauthorizedHandler() func(http.ResponseWriter, *http.Request, string, string) {
|
func (rp *relyingParty) UnauthorizedHandler() func(http.ResponseWriter, *http.Request, string, string) {
|
||||||
if rp.unauthorizedHandler == nil {
|
|
||||||
rp.unauthorizedHandler = DefaultUnauthorizedHandler
|
|
||||||
}
|
|
||||||
return rp.unauthorizedHandler
|
return rp.unauthorizedHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,6 +185,7 @@ func NewRelyingPartyOAuth(config *oauth2.Config, options ...Option) (RelyingPart
|
||||||
oauthConfig: config,
|
oauthConfig: config,
|
||||||
httpClient: httphelper.DefaultHTTPClient,
|
httpClient: httphelper.DefaultHTTPClient,
|
||||||
oauth2Only: true,
|
oauth2Only: true,
|
||||||
|
unauthorizedHandler: DefaultUnauthorizedHandler,
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, optFunc := range options {
|
for _, optFunc := range options {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue