<commit_before>
<h1>KBase Authentication</h1>
<h2>Prerequisites</h2>
This tutorial assumes that you have downloaded and installed the Perl
Bio::KBase::Auth* libraries from the git repo at
ssh://git@github.com/kbase/auth.git or ssh://kbase@git.kbase.us/auth.git<br>
<br>
After checking a copy of the auth repo, if you are in a normal KBase VM
deployment environment you can use the "install-libs" target in the top
level Makefile. If you are on a laptop or local environment change into
the Bio-KBase-Auth subdirectory and run the following commands:<br>
<br>
perl ./Build.PL<br>
perl ./Build installdeps<br>
perl ./Build install<br>
<br>
This will create the appropriate installer script, then install the
dependencies and then install the libraries themselves.<br>
<br>
You will also need the commandline utility "curl" installed in order to
test the commandline token examples.<br>
<br>
<h2>Introduction</h2>
&nbsp;&nbsp;&nbsp;
This is a very quick tutorial that shows sample perl code for acquiring
a Globus Online token and putting it into the<br>
appropriate header for an authenticated KBase request. It is assumed
that you have an account at Globus Online<br>
( go to https://www.globusonline.org/SignUp to register ) and can use
it to get a token - the code sample uses<br>
test accounts that are login to KBase, but will not have any other
privileges.&nbsp; We will also include an example<br>
for shell users using curl.<br><commit_msg>Added required headers (Purpose, etc) and minor text edits.<commit_after>
<h1>KBase Authentication for Perl Clients</h1>
<p><strong>Purpose: </strong> More detail on sample perl code for acquiring a Globus Online token and putting it into the
appropriate header for an authenticated KBase request.</p>
<p><strong>Required Prerequisite Activities: </strong> <a href="http://www.kbase.us/developer-zone/tutorials/getting-started/getting-started-with-kbase/">Getting
Started with KBase</a> </p>
<p> <strong>Suggested Prerequisite Activities: </strong> <a href="http://www.kbase.us/developer-zone/tutorials/iris/some-basic-exercises-using-the-kbase-iris-interface/">Some
Basic Exercises using the KBase IRIS Interface </a> and other IRIS
tutorials. </p>
<p> </p>
<p><strong>Related Tutorials:</strong> <a href="http://www.kbase.us/developer-zone/tutorials/developer-tutorials/kbase-authentication/">Introduction
to Authentication </a> and other
Developer tutorials. </p>
This tutorial assumes that you have downloaded and installed the Perl
Bio::KBase::Auth* libraries from the git repo at
ssh://git@github.com/kbase/auth.git or ssh://kbase@git.kbase.us/auth.git<br>
<br>
After checking a copy of the auth repo, if you are in a normal KBase VM
deployment environment you can use the "install-libs" target in the top
level Makefile. If you are on a laptop or local environment change into
the Bio-KBase-Auth subdirectory and run the following commands:<br>
<br>
perl ./Build.PL<br>
perl ./Build installdeps<br>
perl ./Build install<br>
<br>
This will create the appropriate installer script, then install the
dependencies and then install the libraries themselves.<br>
<br>
You will also need the commandline utility "curl" installed in order to
test the commandline token examples.<br>
<br>
<h2>Introduction</h2>
&nbsp;&nbsp;&nbsp;
This is a very quick tutorial that shows sample perl code for acquiring
a Globus Online token and putting it into the<br>
appropriate header for an authenticated KBase request. It is assumed
that you have an account at Globus Online<br>
( go to https://www.globusonline.org/SignUp to register ) and can use
it to get a token - the code sample uses<br>
test accounts that are login to KBase, but will not have any other
privileges.&nbsp; We will also include an example<br>
for shell users using curl.<br>
{'fraction_non_alphanumeric': 0.09237691900476443, 'fraction_numerical': 0.0026469031233456856, 'mean_word_length': 5.0464, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, 'https://': 2, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4795241', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1098, 'n_words': 487}