Class HttpSession

    • Constructor Detail

      • HttpSession

        public HttpSession​(IRI agent,
                           IRI delegatedBy)
        Create an HTTP-based session.
        Parameters:
        agent - the agent
        delegatedBy - the delegatedBy value
      • HttpSession

        public HttpSession​(IRI agent)
        Create an HTTP-based session.
        Parameters:
        agent - the agent
      • HttpSession

        public HttpSession()
        Create an HTTP-based session.
    • Method Detail

      • getIdentifier

        public IRI getIdentifier()
        Description copied from interface: Session
        Get a session identifier.
        Specified by:
        getIdentifier in interface Session
        Returns:
        a session identifier
      • getAgent

        public IRI getAgent()
        Description copied from interface: Session
        Get an agent identifier.
        Specified by:
        getAgent in interface Session
        Returns:
        an identifier for a user/agent
      • getDelegatedBy

        public Optional<IRI> getDelegatedBy()
        Description copied from interface: Session
        Get the user that delegated access, if one exists.
        Specified by:
        getDelegatedBy in interface Session
        Returns:
        the user who delegated access
      • getCreated

        public Instant getCreated()
        Description copied from interface: Session
        Get the date when the session was created.
        Specified by:
        getCreated in interface Session
        Returns:
        the creation date
      • from

        public static Session from​(SecurityContext security)
        Create a session from a security context.
        Parameters:
        security - the security context
        Returns:
        the session