Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
getauthtoken
is a small command line utility to acquire an authorization token from Xaptum. It's intended to speed up the process of testing API's, since an authorization token is required as a header in every request and new tokens are generated every four hours.
Running getauthtoken
from your command line after installation (see below) will always give the current token.
First, install the gem from Ruby Gems.
$ gem install getauthtoken
Alternatively, if you've already installed getauthtoken
, update the gem to the latest version.
$ gem update getauthtoken
Note that for the above commands you may need to use sudo gem
.
Second, we'll need to create a JSON file .xaptum_config.json
that stores your Xaptum configurations. getauthtoken
will always use the configurations in this file to acquire your auth token.
In your $HOME
directory, create the file .xaptum_config.json
with the following structure:
{
"username": "<YOUR_USERNAME>",
"host": "<YOUR_HOST>"
}
<YOUR_HOST>
should normally be https://xaptum.io
or https://dev.xaptum.io
.
Simply run getauthtoken
from the command line. You will then be prompted for your Xaptum account password. If the password is correct, your token should appear and get copied to your clipboard.
$ getauthtoken
Authenticating with Xaptum...
Enter Password
Your token is <TOKEN>. It has been copied to the clipboard.
You can clone the repository and install the dependencies with Bundler.
$ git clone https://github.com/dylanirlbeck/getauthtoken.git
$ cd getauthtoken
$ bundle install
Write tests, pass tests, bump version, pull request.
test/getauthtoken_test.rb
.lib/getauthtoken.rb
to pass the tests. You can run tests with rake test
.lib/getauthtoken/version.rb
. After you've made your changes, update this version by following the format MAJOR.MINOR.PATCH
.bundle exec rake build
will build a new version of the gem that you can run and test locally by installing with gem install pkg/getauthtoken-<VERSION>
and then running getauthtoken
.Build a new gem version, pushing to Github (along with a tag), and add the new version to Ruby Gems
$ bundle exec rake release
Bug reports and pull requests are welcome on GitHub at https://github.com/dylanirlbeck/getauthtoken.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that getauthtoken demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.