KDE 4.7 PyKDE API Reference

- KDE's Python API

# AuthorizationInterface Class Reference

`from PyKDE4.plasma import *`

Namespace: Plasma

## Detailed Description

AuthorizationInterface plasma/authorizationinterface.h <Plasma/AuthorizationInterface>

Allows authorization of access to plasma services.

This class is only needed when you create a plasma shell. When you implement it and register it with the AuthorizationManager class, it allows you to respond to incoming service access attempts. Whenever a message is received that does not match any of the AuthorizationRules, AuthorizationManager creates a new rule matching it, and passes it to the authorize function. Change the rule from Unspecified to something else like Allow or Deny to continue processing the message. It also allows you to outgoing access attempts that require pin pairing, to allow your shell to show a dialog to ask the user for a password.

Since:
  4.4

## Methods
| __init__ (self)
| authorizationRequest (self, Plasma.AuthorizationRule rule)
| clientPinRequest (self, Plasma.ClientPinRequest request)

## Method Documentation

__init__ | ( |  | self ) |

authorizationRequest | ( | self, |
|  | Plasma.AuthorizationRule | rule
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

implement this function to respond to an incoming request that doesn't match any rule.

Parameters:

  | rule | a new AuthorizationRule matching an incoming operation. Call setRules on this rule to allow/deny the operation.

clientPinRequest | ( | self, |
|  | Plasma.ClientPinRequest | request
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Implement this function to respond to an outgoing connection that needs a password to connect successfully. As a response to this you'll probably want to show a dialog.

Parameters:

  | request | a ClientPinRequest where you can call setPin on to set the pin for the outgoing connection.