Session

edit

Functions

  • CSRFGenerateToken()

    Provides a random token and stores it in the session.

  • CSRFVerifyToken()

    Validates the given token against the same stored in the session for a specific key.

  • GetAuthUser()

    Returns the name of the currently authenticated user. This function checks the application's authentication system and returns the username of the logged-in user. If no user is authenticated, it returns an empty string. The function first attempts to retrieve credentials from the application security context, and if none exist, it falls back to checking the HTTP servlet request for remote user information

  • GetUserRoles()

    Retrieves the list of roles for the current user.

  • SessionCommit()

    Force saving the session to storage, useful when sessionCluster is enabled.

  • SessionExists()

    Returns a boolean indicating if a session has been already created / exists.

  • SessionInvalidate()

    Invalidates or cleans up the current session.

  • SessionRotate()

    invalidate current session, creates a new session and migrate the data from the old session to the new.

  • SessionStartTime()

    Provides information about the time when the current users session scope was created.

Tags

  • <cfauthenticate>

    Authenticates a user, setting a security context for the application. For more information, see the descriptions of IsAuthenticated and AuthenticatedContext.

  • <cflogin>

    A container for user login and authentication code.

  • <cfloginuser>

    Identifies an authenticated user to ColdFusion. Specifies the user ID and roles. Used within a cflogin tag.

  • <cflogout>

    Logs the current user out. Removes knowledge of the user ID, password, and roles from the server. If you do not use this tag, the user is automatically logged out when the session ends.

  • Application.cfc / <cfapplication>

    Defines a CFML Application and configures the properties / behavior of that Application

Guides