Bypass mode

This commit is contained in:
mr
2026-02-17 10:16:18 +01:00
parent 5f7289bb05
commit 048707bfe5
5 changed files with 29 additions and 4 deletions

View File

@@ -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
}