Skip to content

Commit

Permalink
Merge pull request #1883 from jyaistMap/jy-upd-gis-token
Browse files Browse the repository at this point in the history
Added code to illustrate retrieving a token to the Authentication Schema guide
  • Loading branch information
achapkowski authored Aug 6, 2024
2 parents 3eca5df + 9036af3 commit 1338197
Showing 1 changed file with 35 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,38 @@
"print(\"Logged in as anonymous user to \" + gis.properties.portalName)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Authenticated Connections"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Retrieving the token\n",
"\n",
"Most Web GIS users will connect using a method to authenticate and authorize use of the Web GIS. Once authenticated, it can object times be necessary or desirable to retrieve the token from the authenticated GIS. The code below documents how to get the token object:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"token = gis.session.auth.token"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> **note:** See the [Module Contents](/python/api-reference/arcgis.auth.html#module-arcgis.auth) documentation for type of authentication object returned depending upon which authentication schema is being used."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -609,7 +641,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -623,7 +655,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.11"
"version": "3.11.0"
},
"toc": {
"base_numbering": 1,
Expand All @@ -640,5 +672,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}

0 comments on commit 1338197

Please sign in to comment.