@@ -16,7 +16,8 @@ User names and passwords can be implemented in various ways, so you may need to
16
16
system administrator on how to acquire an account.
17
17
18
18
To connect to a CAS server, you simply import SWAT and use the :class: `swat.CAS ` class
19
- to create a connection.
19
+ to create a connection. This has a couple of different forms. The most
20
+ basic is to pass the hostname, port, userid, and password.
20
21
21
22
.. ipython :: python
22
23
:suppress:
@@ -32,6 +33,21 @@ to create a connection.
32
33
import swat
33
34
conn = swat.CAS(host, port, userid, password)
34
35
36
+ However, if you are using a REST connection to CAS, a URL is the more natural
37
+ way to specify a host, port, and protocol.
38
+
39
+ .. ipython :: python
40
+ :verbatim:
41
+
42
+ conn = swat.CAS(' https://my-cas-host.com:443/cas-shared-default-http/' ,
43
+ userid = ' ...' , password = ' ...' )
44
+
45
+ Notice that in the URL case, ``userid `` and ``password ``, must be specified
46
+ as keyword parameters since the ``port `` parameter is being skipped. Also,
47
+ in this case we are using a proxy server that requires the base path
48
+ of 'cas-shared-default-http'. If you are connecting directly to a CAS
49
+ server, this is typically not required.
50
+
35
51
Now that we have a connection to CAS, we can run some actions on it.
36
52
37
53
Running CAS Actions
0 commit comments