Skip to content

XnatCheckLogin Alias Token#537

Open
duettwe wants to merge 3 commits into
mainfrom
duettwe-XnatCheckLogin-TokenGen
Open

XnatCheckLogin Alias Token#537
duettwe wants to merge 3 commits into
mainfrom
duettwe-XnatCheckLogin-TokenGen

Conversation

@duettwe
Copy link
Copy Markdown
Contributor

@duettwe duettwe commented Apr 6, 2026

Added functionality to generate a new XNAT login token and update the .netrc file accordingly.

Added functionality to generate a new XNAT login token and update the .netrc file accordingly.
@duettwe duettwe requested review from baxpr and bud42 April 6, 2026 14:44
@baxpr
Copy link
Copy Markdown
Member

baxpr commented Apr 6, 2026

It would be cleaner to use python requests library instead of curl. Would that break the pre/post update logic or be ok?

@duettwe
Copy link
Copy Markdown
Contributor Author

duettwe commented Apr 7, 2026

I can give requests a go, but I think that was the part giving me the "we updated your token, but you can't update your token" kind of stuff.

@duettwe
Copy link
Copy Markdown
Contributor Author

duettwe commented Apr 7, 2026

Shifted to requests. Did a bit of moving of variables that could (probably should) be global around as well.

Also found this website, which converts curl to requests: https://curlconverter.com/

@duettwe
Copy link
Copy Markdown
Contributor Author

duettwe commented May 1, 2026

  • Flag to force create new token
  • Don't generate if existing token that works
  1. How to maintain list on XNAT? Maybe flag to not delete on XNAT? Delete after 10 are generated?
  2. How to keep netrc files clean?

Updated authors and modified connection testing logic in XnatCheckLogin.
@duettwe
Copy link
Copy Markdown
Contributor Author

duettwe commented May 1, 2026

I think not generating a new token is that easy. This will also help keep the netrc clean.

We still need a flag that would override the --gen command? Maybe like --gen_force

@duettwe duettwe changed the title Implement token generation for XNAT login XnatCheckLogin Alias Token May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants