|
Packit |
8ea169 |
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>org.freedesktop.Problems2.Session</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Problems API"><link rel="up" href="ch02.html" title="Chapter 2. Interfaces"><link rel="prev" href="re02.html" title="org.freedesktop.Problems2.Entry"><link rel="next" href="re04.html" title="org.freedesktop.Problems2.Task"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
Packit |
8ea169 |
org.freedesktop.Problems2.Session
|
|
Packit |
8ea169 |
Prev Chapter 2. Interfaces Next
|
|
Packit |
8ea169 |
org.freedesktop.Problems2.Session
|
|
Packit |
8ea169 |
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.
|
|
Packit |
8ea169 |
Authorize
|
|
Packit |
8ea169 |
(IN Dict<String,Variant> parameters, OUT Int32 result) ;
|
|
Packit |
8ea169 |
RevokeAuthorization
|
|
Packit |
8ea169 |
(void) ;
|
|
Packit |
8ea169 |
GenerateToken
|
|
Packit |
8ea169 |
(IN UInt32 period, OUT String token) ;
|
|
Packit |
8ea169 |
RevokeToken
|
|
Packit |
8ea169 |
(IN String token) ;
|
|
Packit |
8ea169 |
AuthorizationChanged
|
|
Packit |
8ea169 |
(OUT Int32 status) ; PropertiesREAD Boolean IsAuthorized ;
|
|
Packit |
8ea169 |
org.freedesktop.Problems2.Session.Authorize
|
|
Packit |
8ea169 |
|
|
Packit |
8ea169 |
Authorize
|
|
Packit |
8ea169 |
(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.
|
|
Packit |
8ea169 |
parameters
|
|
Packit |
8ea169 |
Additional parameters that can be used for granting authorization:
|
|
Packit |
8ea169 |
- problems2.peer-token
Secret token of the peer's session. - problems2.peer-bus
Unique bus name of the Session that generated the token.
|
|
Packit |
8ea169 |
|
|
Packit |
8ea169 |
result
|
|
Packit |
8ea169 |
|
|
Packit |
8ea169 |
- -1
An error occurred - 0
The authorization request has succeeded and the client is now authorized. - 1
The authorization request has been accepted. - 2
The previous authorization request is not finished yet.
|
|
Packit |
8ea169 |
|
|
Packit |
8ea169 |
org.freedesktop.Problems2.Session.RevokeAuthorization
|
|
Packit |
8ea169 |
|
|
Packit |
8ea169 |
RevokeAuthorization
|
|
Packit |
8ea169 |
(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.
|
|
Packit |
8ea169 |
org.freedesktop.Problems2.Session.GenerateToken
|
|
Packit |
8ea169 |
|
|
Packit |
8ea169 |
GenerateToken
|
|
Packit |
8ea169 |
(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.
|
|
Packit |
8ea169 |
period
|
|
Packit |
8ea169 |
This argument defines the validity period of time in seconds. 0 is interpreted as default which may vary between implementations (~5s).
|
|
Packit |
8ea169 |
token
|
|
Packit |
8ea169 |
A string that should be passed as the value of the 'parent-token' key in the Authorize method's 'parameters' argument.
|
|
Packit |
8ea169 |
org.freedesktop.Problems2.Session.RevokeToken
|
|
Packit |
8ea169 |
|
|
Packit |
8ea169 |
RevokeToken
|
|
Packit |
8ea169 |
(IN String token) ; In case a token is no longer needed. This method can be used to revoke a generated token.
|
|
Packit |
8ea169 |
token
|
|
Packit |
8ea169 |
Token string returned by GenerateToken method.
|
|
Packit |
8ea169 |
org.freedesktop.Problems2.Session.AuthorizationChanged
|
|
Packit |
8ea169 |
|
|
Packit |
8ea169 |
AuthorizationChanged
|
|
Packit |
8ea169 |
(OUT Int32 status) ; Notifies the changes of state of authorization.
|
|
Packit |
8ea169 |
status
|
|
Packit |
8ea169 |
Describes the change that happened and can be one of the following values:
|
|
Packit |
8ea169 |
- 0
The recent authorization request has succeeded and the client is now authorized. - 1
Authorization request is pending. - 2
Authorization has been lost. - 3
Authorization request has failed.
|
|
Packit |
8ea169 |
|
|
Packit |
8ea169 |
Accessed using the org.freedesktop.DBus.Properties interface.
|
|
Packit |
8ea169 |
READ Boolean IsAuthorized ; TRUE if the client is authorized; otherwise FALSE.
|
|
Packit |
8ea169 |
org.freedesktop.Problems2.Entry
|
|
Packit |
8ea169 |
Home
|
|
Packit |
8ea169 |
org.freedesktop.Problems2.Task
|
|
Packit |
8ea169 |
</body></html>
|