alf_session.is_valid {alfr}R Documentation

Determine whether a session is valid.

Description

Determines whether a given session is still valid or not.

Usage

alf_session.is_valid(session)

Arguments

session

session

Value

TRUE if the session is valid, FALSE otherwise

Examples

# 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)
}

[Package alfr version 1.2.1 Index]