Add dummy methods for now
TODO: Store the required variables if not stored already Preferably in a sqlite database. Signed-off-by: Sayan Biswas <sayan@pokurt.me>
This commit is contained in:
parent
c9a4adf1d0
commit
acb2d934da
|
@ -2,4 +2,5 @@ package client
|
|||
|
||||
const (
|
||||
RPC_ENDPOINT = "https://socialvoid.qlg1.com:5601/"
|
||||
VERSION = "0.0.1"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
package client
|
||||
|
||||
// GetSession
|
||||
// Haven't thought of anything yet
|
||||
func (s *SessionRegisterResponse) GetSession() {
|
||||
return
|
||||
func NewSession(publicHash string, privateHash string) (c *CreateSessionStruct) {
|
||||
c.PrivateHash = privateHash
|
||||
c.PublicHash = publicHash
|
||||
c.Name = VERSION
|
||||
c.Platform = ""
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *CreateSessionStruct) GetChallengeAnswer(secret string) (string, error) {
|
||||
// pvt_hash := c.PrivateHash
|
||||
return "", nil
|
||||
}
|
||||
|
|
|
@ -33,10 +33,10 @@ type SessionRegisterResponse struct {
|
|||
LastName string `json:"last_name"`
|
||||
}
|
||||
|
||||
// CreateSessionResponse Establishes a new session to the network, new and unauthenticated sessions expires after 10 minutes of inactivity,
|
||||
// CreateSessionStruct Establishes a new session to the network, new and unauthenticated sessions expires after 10 minutes of inactivity,
|
||||
// authenticating to the session will increase the expiration time to 72 hours of inactivity.
|
||||
// This timer is reset whenever the session is used in one way or another.
|
||||
type CreateSessionResponse struct {
|
||||
type CreateSessionStruct struct {
|
||||
// The Public Hash of the client that's establishing the session
|
||||
PublicHash string `json:"public_hash"`
|
||||
// The Private Hash of the client used when establishing the session
|
||||
|
|
Loading…
Reference in New Issue