alf_session: Get connection session to Alfresco content repository

Description Usage Arguments Value Examples

Description

Validates authentication details with Alfresco content repository, returning ticket, server details and endpoints if successful.

Usage

1
alf_session(server, username, password)

Arguments

server

Alfresco server URL

username

user name

password

password

Value

Connection session to Alfresco repository

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# try to establish a connection to the alfresco content repository
my_session <-
  tryCatch(
    alf_session("http://localhost:8080", "admin", "admin"),
    error = function(e) NULL)

if (!is.null(my_session)) {

  # output session information
  print(paste("Session: [ticket = ", my_session$ticket,
                      ", server = ", my_session$server, "]", sep=""))

  # verify that the session is valid
  if (alf_session.is_valid(my_session)) print("Session verified as valid.")

  # invalidate the session so that it can no longer be used
  alf_session.invalidate(my_session)
}

rwetherall/alfr documentation built on July 19, 2019, 11:34 a.m.