Skip to content

Add a couple of logins (request) #109

Description

@softwaretech

Hi Team,

I'm wondering if you would be able to add a couple of other login options. I was able to go into the workfront.js and add a second login option.

The process is this:

User logs in as API user. After logging in, a sessionID is created. Using that sessionID, a new project/task/etc... can be created as another user logging as as user with sessionID.

Instead of username:username password:password, use username:username sessionID:sessionID. The value of the sessionID would come from the initial API login. Within my code, I duplicated the login:

t.prototype.**login**=function(e,n){var r=this;return this.request("**login**",{username:e,password:n},null,t.Methods.POST).then(function(t){return r.setSessionID(t.sessionID),t})},t.prototype.**login_as**=function(e,s){ var r=this;return this.request("**login**",{username:e,sessionID:s},null,t.Methods.POST).then(function(t){return r.setSessionID(t.sessionID),t})}

The third option to be included would be an API login:

GET /attask/api-internal/project/abc123xxxxx?apiKey=123abcxxxxxxxxx

https://developers.workfront.com/api-docs/#API_key

Thank you so much for developing this code!! Having run this in PHP compared to NodeJS, I've noticed a MUCH faster response using your code in Node.JS. Just a compliment. :)

Let me know if I can answer any questions.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions