Skip to content

Commit 9036af3

Browse files
committed
added code to illustrate retrieving a token
1 parent cc38933 commit 9036af3

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

guide/03-the-gis/working-with-different-authentication-schemes.ipynb

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,38 @@
108108
"print(\"Logged in as anonymous user to \" + gis.properties.portalName)"
109109
]
110110
},
111+
{
112+
"cell_type": "markdown",
113+
"metadata": {},
114+
"source": [
115+
"## Authenticated Connections"
116+
]
117+
},
118+
{
119+
"cell_type": "markdown",
120+
"metadata": {},
121+
"source": [
122+
"### Retrieving the token\n",
123+
"\n",
124+
"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:"
125+
]
126+
},
127+
{
128+
"cell_type": "code",
129+
"execution_count": null,
130+
"metadata": {},
131+
"outputs": [],
132+
"source": [
133+
"token = gis.session.auth.token"
134+
]
135+
},
136+
{
137+
"cell_type": "markdown",
138+
"metadata": {},
139+
"source": [
140+
"> **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."
141+
]
142+
},
111143
{
112144
"cell_type": "markdown",
113145
"metadata": {},
@@ -609,7 +641,7 @@
609641
"metadata": {
610642
"anaconda-cloud": {},
611643
"kernelspec": {
612-
"display_name": "Python 3",
644+
"display_name": "Python 3 (ipykernel)",
613645
"language": "python",
614646
"name": "python3"
615647
},
@@ -623,7 +655,7 @@
623655
"name": "python",
624656
"nbconvert_exporter": "python",
625657
"pygments_lexer": "ipython3",
626-
"version": "3.9.11"
658+
"version": "3.11.0"
627659
},
628660
"toc": {
629661
"base_numbering": 1,
@@ -640,5 +672,5 @@
640672
}
641673
},
642674
"nbformat": 4,
643-
"nbformat_minor": 1
675+
"nbformat_minor": 4
644676
}

0 commit comments

Comments
 (0)