State
Object Hierarchy:
Description:
public class State :
Component
Represent the state of the current request, including request, response, session, authorization.
Content:
Properties:
- public Interface session { set; get; }
Current session, if available
- public Authorize authorization { set; get; }
Current authorization, if available.
- public Request request { set; get; }
Current HTTP Request
- public Response response { set; get; }
Current Response
- public DateTime start { set; get; }
Exact timestamp of the start of this request.
- public Stash stash { set; get; }
Use the stash in this request.
- public IUser? user { get; }
Current user, if authenticated. NULL if no user present.
- public bool has_user { get; }
Return true if a user is authenticated
Creation methods:
Methods:
- public int64 elapsed ()
Elapsed time since the start of this request.
- public float elapsed_ms ()
Elapsed time since the start of this request, in milliseconds.
- public void ping ()
- public bool authorize (string authorizer_name, string username, string password)
Shortcut method to authorization.authorize() method.
- public void logout ()
Shortcut to remove user and destroy session.
Fields:
Inherited Members:
All known members inherited from class Ambition.Component
All known members inherited from class GLib.Object