Skip to content

Automatically use new token #7

Open

Description

@harrisonhjones

Allow users to automatically grab a new access token and set that as their active token.

Flow would be something like this:
$obj->setAuth($email, $password);
$obj->useNewToken($clearAuth=true);

useNewToken essentially would do the following:
$token = createToken()
setToken($token)
and (if $clearAuth == true) clearAuth()

Thoughts?

Activity

  1. devinpearson commented on Mar 16, 2015

    @devinpearson
    Contributor

    Something Ive done is stored my tokens in a db.
    I then retrieve the latest token by its expiry date.
    if the expiry date has lapsed or is close to todays date I then generate a new one and save it in the db

  2. harrisonhjones commented on Mar 16, 2015

    @harrisonhjones
    OwnerAuthor

    Alright. Do you think it's worth it to write such a function or should we just leave it up to the user to set the auth, load a new token, and then set the new token? (If they started without a token for example)?

  3. devinpearson commented on Mar 17, 2015

    @devinpearson
    Contributor

    i recon we leave that for the dashboard.

    I think this should be a connector clash and it should be stateless.
    If we add dbs to it it will just raise the requirements needed to get connected to a spark core

  4. harrisonhjones commented on Mar 17, 2015

    @harrisonhjones
    OwnerAuthor

    Oh, I do agree with that. I was simply thinking about a function to make the whole get-and-use-access-token-for-this-session-only process easier. Perhaps in a separate branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions