org.freedesktop.Problems2.Session
org.freedesktop.Problems2.Session — Session objects hold information about identity of clients. A session object is created automatically when a new client makes connection. Clients are treated as an anonymous users until they are authorized in 'Authorize' method.
org.freedesktop.Problems2.Session.Authorize
Authorize
( | IN Dict<String,Variant> parameters, |
OUT Int32 result) ; |
The method authorizes the client for access to all problems. The method returns immediately and the authorization results are reported through AuthorizationChanged signal.
parameters
Additional parameters that can be used for granting authorization:
Secret token of the peer's session.
Unique bus name of the Session that generated the token.
result
An error occurred
The authorization request has succeeded and the client is now authorized.
The authorization request has been accepted.
The previous authorization request is not finished yet.
org.freedesktop.Problems2.Session.RevokeAuthorization
RevokeAuthorization
( | void) ; |
Disposes the current session object and drops all authorization tokens. If the client makes a further action, a new session object on the same path will be created.
org.freedesktop.Problems2.Session.GenerateToken
GenerateToken
( | IN UInt32 period, |
OUT String token) ; |
This methods generates a string that can be used by another Session for authorization without prompting for password. The token can be used only once and only by the same user as the one that owns the Session object that generated the token. The token remains valid for a limited period of time. The method will fail if called on a Session object that is not authorize yet. In case the token will not be used, the token can be revoked by RevokeToken method. The method can be called only on a Session that is currently authorized.
period
This argument defines the validity period of time in seconds. 0 is interpreted as default which may vary between implementations (~5s).
token
A string that should be passed as the value of the 'parent-token' key in the Authorize method's 'parameters' argument.
org.freedesktop.Problems2.Session.AuthorizationChanged
AuthorizationChanged
( | OUT Int32 status) ; |
Notifies the changes of state of authorization.
status
Describes the change that happened and can be one of the following values:
The recent authorization request has succeeded and the client is now authorized.
Authorization request is pending.
Authorization has been lost.
Authorization request has failed.