Skip to content

Commit 9c4a340

Browse files
committed
put usage examples in README
1 parent 438c4f9 commit 9c4a340

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,29 @@ returns from the transaction.
180180

181181
If an .irodsA file exists already, it will be overwritten.
182182

183+
Examples:
184+
For the native authentication scheme, we can use the currently set iRODS password to create .irodsA file from Python thus:
185+
186+
```python
187+
import irods.client_init as iinit
188+
iinit.write_native_credentials_to_secrets_file(irods_password)
189+
```
190+
191+
For the `pam_password` authentication scheme, we must first ensure an `irods_environment.json` file exists in the
192+
client environment (necessary for establishing SSL/TLS connection parameters as well as obtaining a PAM token from the server after connecting)
193+
and then make the call to write .irodsA using the Bash commands:
194+
195+
```bash
196+
$ cat > ~/.irods/irods_environment.json << EOF
197+
{
198+
"irods_user_name":"rods",
199+
"irods_host":"server-hostname",
200+
... [all other connection settings, including SSL parameters, needed for communication with iRODS] ...
201+
}
202+
EOF
203+
$ python -c "import irods.client_init as iinit; iinit.write_pam_credentials_to_secrets_file(pam_cleartext_password)
204+
```
205+
183206
PAM logins
184207
----------
185208

0 commit comments

Comments
 (0)