Hello
I am using jira-client npm, I want before doing any actual calls (creating tickets, find issues , ... ) to check whether the user has valid credentials for making API calls (for example maybe the token has expired or the credentials are incorrect).
Is there a separate call to check if the credentials are valid?, if not then I will inform the user that they need to provide valid once, else I will let them do what they want to do.
I am not talking necessary about jira-client node module .. I am talking in general (for example by using node fetch module which allows me to do normal fetch methods).
I know that if the credentials are incorrect I will get a message for that, but I want to check that in a special call.
No, there's no separate call to check credentials. Just try logging in with them.
you mean by try to logging with them:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
so in jira-client node module this is not possible I think .. since there is no method for such a call
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, sorry, I think I have explained it very badly.
In order to check credentials, you simply try to use them. If they're good, you'll get a response, if they're not, you'll get an error telling you the credentials are invalid.
The most simple one I've seen for a REST test of an account is a short script that just tried to ask for some known information like a single issue that is always there or the list of boards etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanx ..
I decided to go asking for project information (it is findproject in the node module with I am using) , in this way I can check two cases ..if the credentials are valid .. and if the user is authorized to the project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.