|
Packit Service |
8a8a03 |
<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 Service |
8a8a03 |
org.freedesktop.Problems2.Session
|
|
Packit Service |
8a8a03 |
Prev Chapter 2. Interfaces Next
|
|
Packit Service |
8a8a03 |
org.freedesktop.Problems2.Session
|
|
Packit Service |
8a8a03 |
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 Service |
8a8a03 |
Authorize
|
|
Packit Service |
8a8a03 |
(IN Dict<String,Variant> parameters, OUT Int32 result) ;
|
|
Packit Service |
8a8a03 |
RevokeAuthorization
|
|
Packit Service |
8a8a03 |
(void) ;
|
|
Packit Service |
8a8a03 |
GenerateToken
|
|
Packit Service |
8a8a03 |
(IN UInt32 period, OUT String token) ;
|
|
Packit Service |
8a8a03 |
RevokeToken
|
|
Packit Service |
8a8a03 |
(IN String token) ;
|
|
Packit Service |
8a8a03 |
AuthorizationChanged
|
|
Packit Service |
8a8a03 |
(OUT Int32 status) ; PropertiesREAD Boolean IsAuthorized ;
|
|
Packit Service |
8a8a03 |
org.freedesktop.Problems2.Session.Authorize
|
|
Packit Service |
8a8a03 |
|
|
Packit Service |
8a8a03 |
Authorize
|
|
Packit Service |
8a8a03 |
(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 Service |
8a8a03 |
parameters
|
|
Packit Service |
8a8a03 |
Additional parameters that can be used for granting authorization:
|
|
Packit Service |
8a8a03 |
- problems2.peer-token
Secret token of the peer's session. - problems2.peer-bus
Unique bus name of the Session that generated the token.
|
|
Packit Service |
8a8a03 |
|
|
Packit Service |
8a8a03 |
result
|
|
Packit Service |
8a8a03 |
|
|
Packit Service |
8a8a03 |
- -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 Service |
8a8a03 |
|
|
Packit Service |
8a8a03 |
org.freedesktop.Problems2.Session.RevokeAuthorization
|
|
Packit Service |
8a8a03 |
|
|
Packit Service |
8a8a03 |
RevokeAuthorization
|
|
Packit Service |
8a8a03 |
(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 Service |
8a8a03 |
org.freedesktop.Problems2.Session.GenerateToken
|
|
Packit Service |
8a8a03 |
|
|
Packit Service |
8a8a03 |
GenerateToken
|
|
Packit Service |
8a8a03 |
(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 Service |
8a8a03 |
period
|
|
Packit Service |
8a8a03 |
This argument defines the validity period of time in seconds. 0 is interpreted as default which may vary between implementations (~5s).
|
|
Packit Service |
8a8a03 |
token
|
|
Packit Service |
8a8a03 |
A string that should be passed as the value of the 'parent-token' key in the Authorize method's 'parameters' argument.
|
|
Packit Service |
8a8a03 |
org.freedesktop.Problems2.Session.RevokeToken
|
|
Packit Service |
8a8a03 |
|
|
Packit Service |
8a8a03 |
RevokeToken
|
|
Packit Service |
8a8a03 |
(IN String token) ; In case a token is no longer needed. This method can be used to revoke a generated token.
|
|
Packit Service |
8a8a03 |
token
|
|
Packit Service |
8a8a03 |
Token string returned by GenerateToken method.
|
|
Packit Service |
8a8a03 |
org.freedesktop.Problems2.Session.AuthorizationChanged
|
|
Packit Service |
8a8a03 |
|
|
Packit Service |
8a8a03 |
AuthorizationChanged
|
|
Packit Service |
8a8a03 |
(OUT Int32 status) ; Notifies the changes of state of authorization.
|
|
Packit Service |
8a8a03 |
status
|
|
Packit Service |
8a8a03 |
Describes the change that happened and can be one of the following values:
|
|
Packit Service |
8a8a03 |
- 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 Service |
8a8a03 |
|
|
Packit Service |
8a8a03 |
Accessed using the org.freedesktop.DBus.Properties interface.
|
|
Packit Service |
8a8a03 |
READ Boolean IsAuthorized ; TRUE if the client is authorized; otherwise FALSE.
|
|
Packit Service |
8a8a03 |
org.freedesktop.Problems2.Entry
|
|
Packit Service |
8a8a03 |
Home
|
|
Packit Service |
8a8a03 |
org.freedesktop.Problems2.Task
|
|
Packit Service |
8a8a03 |
</body></html>
|