auth
This commit is contained in:
@@ -196,7 +196,7 @@ func (a HydraConnector) Login(clientID string, username string, cookies ...*http
|
|||||||
json.Unmarshal(b, &m)
|
json.Unmarshal(b, &m)
|
||||||
pp := oclib.NewRequest(oclib.LibDataEnum(oclib.PEER), "", "", []string{}, nil).Search(nil, strconv.Itoa(peer.SELF.EnumIndex()), false)
|
pp := oclib.NewRequest(oclib.LibDataEnum(oclib.PEER), "", "", []string{}, nil).Search(nil, strconv.Itoa(peer.SELF.EnumIndex()), false)
|
||||||
if len(pp.Data) == 0 || pp.Code >= 300 || pp.Err != "" {
|
if len(pp.Data) == 0 || pp.Code >= 300 || pp.Err != "" {
|
||||||
fmt.Println(pp.Data, pp.Code, pp.Err)
|
fmt.Println(pp.Data, pp.Code, pp.Err, strconv.Itoa(peer.SELF.EnumIndex()))
|
||||||
return nil, errors.New("peer not found")
|
return nil, errors.New("peer not found")
|
||||||
}
|
}
|
||||||
now := time.Now().UTC()
|
now := time.Now().UTC()
|
||||||
@@ -254,6 +254,7 @@ func (a HydraConnector) Introspect(token string, cookie ...*http.Cookie) (bool,
|
|||||||
}
|
}
|
||||||
var introspect Token
|
var introspect Token
|
||||||
err = json.Unmarshal(b, &introspect)
|
err = json.Unmarshal(b, &introspect)
|
||||||
|
fmt.Println(introspect.Active, token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user