func (a *PublicApi) Rsakey() (map[string]interface{}, error) { k := gos.GetRSAKey(0) m := make(map[string]interface{}, 0) m["hex"] = fmt.Sprintf("%x", k.Key.PublicKey.N) m["keyid"] = k.CreatedAt.Unix() m["unix"] = time.Now().Unix() isOk := a.GetUserAuth().IsOk() m["is_login"] = isOk return m, nil }
func (a *PublicApi) Rsakey() (map[string]interface{}, error) { k := gos.GetRSAKey(0) m := make(map[string]interface{}, 0) m["hex"] = fmt.Sprintf("%x", k.Key.PublicKey.N) m["keyid"] = k.CreatedAt.Unix() m["unix"] = time.Now().Unix() au := a.GetUserAuth() isOk := au.IsOk() user := au.User() delete(user, "id") delete(user, "salt") delete(user, "token") m["is_login"] = isOk m["user"] = user.Bytes2String() return m, nil }