1 | <?php |
||
15 | class Dataporten extends AbstractService |
||
16 | { |
||
17 | // Authentication and userinfo |
||
18 | const SCOPE_USER_ID = 'userid'; |
||
19 | const SCOPE_FEIDE_IDENTIFIER = 'userid-feide'; |
||
20 | const SCOPE_NAME_PROFILE_PHOTO = 'profile'; |
||
21 | const SCOPE_EMAIL = 'email'; |
||
22 | const SCOPE_NATIONAL_ID_NUMBER = 'userid_nin'; // hidden |
||
23 | const SCOPE_OPENID_ACCESS = 'openid'; // tech |
||
24 | const SCOPE_LONG_TERM_ACCESS = 'longterm'; // tech |
||
25 | |||
26 | // Groups |
||
27 | const SCOPE_GROUPS = 'groups'; // See API docs |
||
28 | const SCOPE_MEMBER_IDS = 'groups-memberids'; // hidden |
||
29 | const SCOPE_ORGADMIN_GROUPS = 'groups-orgadmin'; // hidden, internal |
||
30 | const SCOPE_PEOPLE_SEARCH = 'peoplesearch'; // hidden |
||
31 | |||
32 | |||
33 | public function __construct( |
||
45 | |||
46 | /** |
||
47 | * @inheritDoc |
||
48 | */ |
||
49 | protected function parseAccessTokenResponse($responseBody) |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | protected function getAuthorizationMethod() |
||
81 | |||
82 | /** |
||
83 | * @inheritDoc |
||
84 | */ |
||
85 | public function getAuthorizationEndpoint() |
||
89 | |||
90 | /** |
||
91 | * @inheritDoc |
||
92 | */ |
||
93 | public function getAccessTokenEndpoint() |
||
97 | |||
98 | /** |
||
99 | * Used to configure response type -- we want JSON from Dataporten, default is query string format |
||
100 | * |
||
101 | * @return array |
||
102 | */ |
||
103 | protected function getExtraOAuthHeaders() |
||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | protected function getScopesDelimiter() |
||
115 | |||
116 | } |
||
117 |