fixes and casing
This commit is contained in:
committed by
Nikolay Stupak
parent
cd8a983bdd
commit
5ea0476107
@ -14,22 +14,22 @@ import (
|
||||
// LogoutReqDoer fetches information on the OAuth2 request and then accepts or rejects the requested logout process.
|
||||
type LogoutReqDoer struct {
|
||||
hydraURL string
|
||||
fakeTlsTermination bool
|
||||
fakeTLSTermination bool
|
||||
}
|
||||
|
||||
// NewLogoutReqDoer creates a LogoutRequest.
|
||||
func NewLogoutReqDoer(hydraURL string, fakeTlsTermination bool) *LogoutReqDoer {
|
||||
return &LogoutReqDoer{hydraURL: hydraURL, fakeTlsTermination: fakeTlsTermination}
|
||||
func NewLogoutReqDoer(hydraURL string, fakeTLSTermination bool) *LogoutReqDoer {
|
||||
return &LogoutReqDoer{hydraURL: hydraURL, fakeTLSTermination: fakeTLSTermination}
|
||||
}
|
||||
|
||||
// InitiateRequest fetches information on the OAuth2 request.
|
||||
func (lrd *LogoutReqDoer) InitiateRequest(challenge string) (*ReqInfo, error) {
|
||||
ri, err := initiateRequest(logout, lrd.hydraURL, lrd.fakeTlsTermination, challenge)
|
||||
ri, err := initiateRequest(logout, lrd.hydraURL, lrd.fakeTLSTermination, challenge)
|
||||
return ri, errors.Wrap(err, "failed to initiate logout request")
|
||||
}
|
||||
|
||||
// AcceptLogoutRequest accepts the requested logout process, and returns redirect URI.
|
||||
func (lrd *LogoutReqDoer) AcceptLogoutRequest(challenge string) (string, error) {
|
||||
redirectURI, err := acceptRequest(logout, lrd.hydraURL, lrd.fakeTlsTermination, challenge, nil)
|
||||
redirectURI, err := acceptRequest(logout, lrd.hydraURL, lrd.fakeTLSTermination, challenge, nil)
|
||||
return redirectURI, errors.Wrap(err, "failed to accept logout request")
|
||||
}
|
||||
|
Reference in New Issue
Block a user