Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace Drupal\authorization\Provider;
6
7use Drupal\authorization\Plugin\ConfigurableAuthorizationPluginInterface;
8use Drupal\user\UserInterface;
9
10/**
11 * Defines an interface for Authorization provider plugins.
12 */
13interface ProviderInterface extends ConfigurableAuthorizationPluginInterface {
14
15  /**
16   * Provider-side filtering.
17   *
18   * @param array $proposals
19   *   Available proposals.
20   * @param array $providerMapping
21   *   What the proposal should be filtered against in the provider.
22   *
23   * @return array
24   *   Filtered proposals.
25   */
26  public function filterProposals(array $proposals, array $providerMapping): array;
27
28  /**
29   * Get the proposals for this users.
30   *
31   * @param \Drupal\user\UserInterface $user
32   *   The user to act upon.
33   *
34   * @return array
35   *   Relevant proposals.
36   */
37  public function getProposals(UserInterface $user): array;
38
39  /**
40   * Sanitize proposals.
41   *
42   * @param array $proposals
43   *   Raw proposals.
44   *
45   * @return array
46   *   Processed proposals.
47   */
48  public function sanitizeProposals(array $proposals): array;
49
50  /**
51   * Provides sync on logon.
52   *
53   * @return bool
54   *   Sync on logon supported.
55   */
56  public function isSyncOnLogonSupported(): bool;
57
58  /**
59   * Provides revocation.
60   *
61   * @return bool
62   *   Revocation supported.
63   */
64  public function revocationSupported(): bool;
65
66}