Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
common
extensions
eauth
IAuthService.php
1
<?php
2
/**
3
* IAuthService interface file.
4
*
5
* @author Maxim Zemskov <nodge@yandex.ru>
6
* @link http://code.google.com/p/yii-eauth/
7
* @license http://www.opensource.org/licenses/bsd-license.php
8
*/
9
10
/**
11
* IAuthService is the interface for all service types and providers.
12
* @package application.extensions.eauth
13
*/
14
interface
IAuthService
{
15
16
/**
17
* Initizlize the component.
18
* @param EAuth $component the component instance.
19
* @param array $options properties initialization.
20
*/
21
public
function
init
($component, $options = array());
22
23
24
/**
25
* Returns service name(id).
26
*/
27
public
function
getServiceName
();
28
29
/**
30
* Returns service title.
31
*/
32
public
function
getServiceTitle
();
33
34
/**
35
* Returns service type (e.g. OpenID, OAuth).
36
*/
37
public
function
getServiceType
();
38
39
/**
40
* Returns arguments for the jQuery.eauth() javascript function.
41
*/
42
public
function
getJsArguments
();
43
44
45
/**
46
* Sets {@link EAuth} application component
47
* @param EAuth $component the application auth component.
48
*/
49
public
function
setComponent
($component);
50
51
/**
52
* Returns the {@link EAuth} application component.
53
*/
54
public
function
getComponent
();
55
56
57
/**
58
* Sets redirect url after successful authorization.
59
* @param string url to redirect.
60
*/
61
public
function
setRedirectUrl
($url);
62
63
/**
64
* Returns the redirect url after successful authorization.
65
*/
66
public
function
getRedirectUrl
();
67
68
69
/**
70
* Sets redirect url after unsuccessful authorization (e.g. user canceled).
71
* @param string url to redirect.
72
*/
73
public
function
setCancelUrl
($url);
74
75
/**
76
* Returns the redirect url after unsuccessful authorization (e.g. user canceled).
77
*/
78
public
function
getCancelUrl
();
79
80
81
/**
82
* Authenticate the user.
83
*/
84
public
function
authenticate
();
85
86
/**
87
* Whether user was successfuly authenticated.
88
*/
89
public
function
getIsAuthenticated
();
90
91
92
/**
93
* Redirect to the url. If url is null, {@link redirectUrl} will be used.
94
* @param string $url url to redirect.
95
*/
96
public
function
redirect
($url = null);
97
98
/**
99
* Redirect to the {@link cancelUrl} or simply close the popup window.
100
*/
101
public
function
cancel
();
102
103
104
/**
105
* Returns the user unique id.
106
*/
107
public
function
getId
();
108
109
/**
110
* Returns the array that contains all available authorization attributes.
111
*/
112
public
function
getAttributes
();
113
114
/**
115
* Returns the authorization attribute value.
116
* @param string $key the attribute name.
117
* @param mixed $default the default value.
118
*/
119
public
function
getAttribute
($key, $default = null);
120
121
/**
122
* Whether the authorization attribute exists.
123
* @param string $key the attribute name.
124
*/
125
public
function
hasAttribute
($key);
126
127
/**
128
* Returns an object with a human-readable representation of the current authorization.
129
*/
130
public
function
getItem
();
131
132
}
Generated on Thu Feb 6 2014 15:47:54 for Gentics Portal.Node PHP API by
1.8.1.2