Bypass mode
This commit is contained in:
@@ -71,7 +71,6 @@ func (a HydraConnector) challenge(username string, url string, challenge string,
|
||||
resp, err := a.Caller.CallRaw(http.MethodPut,
|
||||
a.getPath(true, true), "/auth/requests/"+challenge+"/accept?"+challenge+"_challenge="+s[1],
|
||||
body, "application/json", true, cookies...) // "remember": true, "subject": username
|
||||
fmt.Println(a.getPath(true, true), "/auth/requests/"+challenge+"/accept?"+challenge+"_challenge="+s[1], resp, err)
|
||||
if err != nil {
|
||||
return nil, s[1], cookies, err
|
||||
}
|
||||
@@ -80,7 +79,6 @@ func (a HydraConnector) challenge(username string, url string, challenge string,
|
||||
if err != nil {
|
||||
return nil, s[1], cookies, err
|
||||
}
|
||||
fmt.Println(string(b))
|
||||
var token Redirect
|
||||
err = json.Unmarshal(b, &token)
|
||||
if err != nil {
|
||||
@@ -260,6 +258,11 @@ func (a HydraConnector) Introspect(token string, cookie ...*http.Cookie) (bool,
|
||||
return false, err
|
||||
}
|
||||
introspect.AccessToken = token
|
||||
|
||||
// temporary TODO : real oauth2
|
||||
introspect.Active = true
|
||||
introspect.ExpiresIn = 3600
|
||||
|
||||
return introspect.Active, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user