Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Χάρης Παπαδόπουλος
e-epal
Commits
be16673c
Commit
be16673c
authored
Mar 02, 2017
by
Χάρης Παπαδόπουλος
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New oauthost module. Beta Version for testing
parent
83f1145d
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
2264 additions
and
571 deletions
+2264
-571
drupal/modules/epal/epal.routing.yml
drupal/modules/epal/epal.routing.yml
+8
-0
drupal/modules/epal/src/Controller/Login.php
drupal/modules/epal/src/Controller/Login.php
+58
-3
drupal/modules/epal/src/Entity/EpalUsers.php
drupal/modules/epal/src/Entity/EpalUsers.php
+124
-121
drupal/modules/oauthost/config/install/oauthost.settings.yml
drupal/modules/oauthost/config/install/oauthost.settings.yml
+0
-0
drupal/modules/oauthost/oauthost.links.action.yml
drupal/modules/oauthost/oauthost.links.action.yml
+10
-0
drupal/modules/oauthost/oauthost.links.menu.yml
drupal/modules/oauthost/oauthost.links.menu.yml
+28
-0
drupal/modules/oauthost/oauthost.links.task.yml
drupal/modules/oauthost/oauthost.links.task.yml
+44
-0
drupal/modules/oauthost/oauthost.permissions.yml
drupal/modules/oauthost/oauthost.permissions.yml
+44
-0
drupal/modules/oauthost/oauthost.routing.yml
drupal/modules/oauthost/oauthost.routing.yml
+6
-0
drupal/modules/oauthost/oauthost.services.yml
drupal/modules/oauthost/oauthost.services.yml
+0
-5
drupal/modules/oauthost/oauthost_config.page.inc
drupal/modules/oauthost/oauthost_config.page.inc
+30
-0
drupal/modules/oauthost/oauthost_session.page.inc
drupal/modules/oauthost/oauthost_session.page.inc
+30
-0
drupal/modules/oauthost/src/Authentication/Provider/OAuthOSTConsumer.php
...oauthost/src/Authentication/Provider/OAuthOSTConsumer.php
+0
-231
drupal/modules/oauthost/src/Controller/CBController.php
drupal/modules/oauthost/src/Controller/CBController.php
+185
-70
drupal/modules/oauthost/src/Controller/OAuthLogin.php
drupal/modules/oauthost/src/Controller/OAuthLogin.php
+113
-0
drupal/modules/oauthost/src/Entity/OAuthOSTConfig.php
drupal/modules/oauthost/src/Entity/OAuthOSTConfig.php
+408
-0
drupal/modules/oauthost/src/Entity/OAuthOSTConfigInterface.php
...l/modules/oauthost/src/Entity/OAuthOSTConfigInterface.php
+77
-0
drupal/modules/oauthost/src/Entity/OAuthOSTConfigViewsData.php
...l/modules/oauthost/src/Entity/OAuthOSTConfigViewsData.php
+24
-0
drupal/modules/oauthost/src/Entity/OAuthOSTSession.php
drupal/modules/oauthost/src/Entity/OAuthOSTSession.php
+252
-0
drupal/modules/oauthost/src/Entity/OAuthOSTSessionInterface.php
.../modules/oauthost/src/Entity/OAuthOSTSessionInterface.php
+77
-0
drupal/modules/oauthost/src/Entity/OAuthOSTSessionViewsData.php
.../modules/oauthost/src/Entity/OAuthOSTSessionViewsData.php
+24
-0
drupal/modules/oauthost/src/Form/OAuthOSTConfigDeleteForm.php
...al/modules/oauthost/src/Form/OAuthOSTConfigDeleteForm.php
+15
-0
drupal/modules/oauthost/src/Form/OAuthOSTConfigForm.php
drupal/modules/oauthost/src/Form/OAuthOSTConfigForm.php
+50
-0
drupal/modules/oauthost/src/Form/OAuthOSTConfigSettingsForm.php
.../modules/oauthost/src/Form/OAuthOSTConfigSettingsForm.php
+55
-0
drupal/modules/oauthost/src/Form/OAuthOSTSessionDeleteForm.php
...l/modules/oauthost/src/Form/OAuthOSTSessionDeleteForm.php
+15
-0
drupal/modules/oauthost/src/Form/OAuthOSTSessionForm.php
drupal/modules/oauthost/src/Form/OAuthOSTSessionForm.php
+50
-0
drupal/modules/oauthost/src/Form/OAuthOSTSessionSettingsForm.php
...modules/oauthost/src/Form/OAuthOSTSessionSettingsForm.php
+55
-0
drupal/modules/oauthost/src/OAuthOSTConfigAccessControlHandler.php
...dules/oauthost/src/OAuthOSTConfigAccessControlHandler.php
+47
-0
drupal/modules/oauthost/src/OAuthOSTConfigHtmlRouteProvider.php
.../modules/oauthost/src/OAuthOSTConfigHtmlRouteProvider.php
+85
-0
drupal/modules/oauthost/src/OAuthOSTConfigListBuilder.php
drupal/modules/oauthost/src/OAuthOSTConfigListBuilder.php
+45
-0
drupal/modules/oauthost/src/OAuthOSTSessionAccessControlHandler.php
...ules/oauthost/src/OAuthOSTSessionAccessControlHandler.php
+47
-0
drupal/modules/oauthost/src/OAuthOSTSessionHtmlRouteProvider.php
...modules/oauthost/src/OAuthOSTSessionHtmlRouteProvider.php
+85
-0
drupal/modules/oauthost/src/OAuthOSTSessionListBuilder.php
drupal/modules/oauthost/src/OAuthOSTSessionListBuilder.php
+45
-0
drupal/modules/oauthost/templates/oauthost_config.html.twig
drupal/modules/oauthost/templates/oauthost_config.html.twig
+22
-0
drupal/modules/oauthost/templates/oauthost_session.html.twig
drupal/modules/oauthost/templates/oauthost_session.html.twig
+22
-0
source/app.settings.ts
source/app.settings.ts
+2
-3
source/components/home.ts
source/components/home.ts
+1
-1
source/components/home.ts.save
source/components/home.ts.save
+0
-129
source/services/helper-data-service.ts
source/services/helper-data-service.ts
+81
-8
No files found.
drupal/modules/epal/epal.routing.yml
View file @
be16673c
...
...
@@ -4,6 +4,14 @@ epal_is_logged_in:
_controller
:
'
\Drupal\epal\Controller\Login::helloWorld'
requirements
:
_access
:
'
TRUE'
epal_entityapi_test
:
path
:
'
/epal/entityapi/test'
options
:
_auth
:
[
'
basic_auth'
]
requirements
:
_user_is_logged_in
:
'
TRUE'
defaults
:
_controller
:
'
\Drupal\epal\Controller\Login::testQuery'
epal_auth_test
:
path
:
'
epal/auth/test'
options
:
...
...
drupal/modules/epal/src/Controller/Login.php
View file @
be16673c
...
...
@@ -11,6 +11,7 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
use
Symfony\Component\HttpFoundation\JsonResponse
;
use
Drupal\Core\Controller\ControllerBase
;
use
Drupal\Core\Entity\EntityFieldManagerInterface
;
/**
* Controller routines for page example routes.
...
...
@@ -18,18 +19,22 @@ use Drupal\Core\Controller\ControllerBase;
class
Login
extends
ControllerBase
{
protected
$query_factory
;
protected
$entityTypeManager
;
protected
$entityFieldManager
;
public
function
__construct
(
EntityTypeManagerInterface
$entityTypeManager
,
QueryFactory
$query_factory
)
{
public
function
__construct
(
EntityTypeManagerInterface
$entityTypeManager
,
QueryFactory
$query_factory
,
EntityFieldManagerInterface
$entityFieldManager
)
{
// public function __construct(QueryFactory $query_factory) {
$this
->
entityTypeManager
=
$entityTypeManager
;
$this
->
query_factory
=
$query_factory
;
$this
->
entityFieldManager
=
$entityFieldManager
;
}
public
static
function
create
(
ContainerInterface
$container
)
{
return
new
static
(
$container
->
get
(
'entity.manager'
),
$container
->
get
(
'entity.query'
)
$container
->
get
(
'entity_type.manager'
),
$container
->
get
(
'entity.query'
),
$container
->
get
(
'entity_field.manager'
)
);
}
...
...
@@ -67,7 +72,57 @@ public function helloWorld() {
}
return
array_values
(
$arrayToReturn
);
}
public
function
object_2_array
(
$result
)
{
$array
=
array
();
foreach
(
$result
as
$key
=>
$value
)
{
if
(
is_object
(
$value
))
{
$array
[
$key
]
=
$this
->
object_2_array
(
$value
);
}
elseif
(
is_array
(
$value
))
{
$array
[
$key
]
=
$this
->
object_2_array
(
$value
);
}
else
{
$array
[
$key
]
=
$value
;
}
}
return
$array
;
}
public
function
testQuery
()
{
$query
=
$this
->
query_factory
->
get
(
'epal_users'
);
// ->condition('status', 1);
$scids
=
$query
->
execute
();
$epalUsers_storage
=
$this
->
entityTypeManager
->
getStorage
(
'epal_users'
);
$epalUsers
=
$epalUsers_storage
->
loadMultiple
(
$scids
);
$arrayToReturn
=
array
();
$j
=
0
;
foreach
(
$epalUsers
as
$epalUser
)
{
// print_r($epalUser);
// $arrayToReturn[$j] = implode(",", $this->object_2_array($epalUser->id) );
$arrayToReturn
[
$j
]
=
$epalUser
->
user_id
->
target_id
;
$j
++
;
/* foreach ($epalUser->name as $delta => $item) {
$arrayToReturn[$delta] = $item->value;
} */
/* array_push($arrayToReturn,
$epalUser->surname->getValue()); */
}
// return array_values($arrayToReturn);
$response
=
new
JsonResponse
(
$arrayToReturn
);
return
$response
;
}
public
function
basicQuery
()
{
return
[
...
...
drupal/modules/epal/src/Entity/EpalUsers.php
View file @
be16673c
...
...
@@ -49,6 +49,9 @@ use Drupal\user\UserInterface;
* "name" = "name",
* "surname" = "surname",
* "taxis_taxid" = "taxis_taxid",
* "requesttoken" = "requesttoken",
* "accesstoken" = "accesstoken",
* "authtoken" = "authtoken",
* },
* links = {
* "canonical" = "/admin/structure/epal_users/{epal_users}",
...
...
@@ -60,7 +63,7 @@ use Drupal\user\UserInterface;
* field_ui_base_route = "epal_users.settings"
* )
*/
class
EpalUsers
extends
ContentEntityBase
implements
EpalUsersInterface
{
use
EntityChangedTrait
;
...
...
@@ -149,11 +152,11 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'status'
,
$published
?
TRUE
:
FALSE
);
return
$this
;
}
/**
* get / set methods for aditional fields
* get / set methods for aditional fields
*/
public
function
getDrupaluser_id
()
{
return
$this
->
get
(
'drupaluser_id'
)
->
value
;
}
...
...
@@ -162,7 +165,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'drupaluser_id'
,
$name
);
return
$this
;
}
public
function
getTaxis_userid
()
{
return
$this
->
get
(
'taxis_userid'
)
->
value
;
}
...
...
@@ -171,7 +174,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'taxis_userid'
,
$name
);
return
$this
;
}
public
function
getTaxis_taxid
()
{
return
$this
->
get
(
'taxis_taxid'
)
->
value
;
}
...
...
@@ -180,7 +183,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'taxis_taxid'
,
$name
);
return
$this
;
}
public
function
getSurname
()
{
return
$this
->
get
(
'surname'
)
->
value
;
}
...
...
@@ -189,7 +192,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'surname'
,
$name
);
return
$this
;
}
public
function
getFathername
()
{
return
$this
->
get
(
'fathername'
)
->
value
;
}
...
...
@@ -198,7 +201,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'fathername'
,
$name
);
return
$this
;
}
public
function
getMothername
()
{
return
$this
->
get
(
'mothername'
)
->
value
;
}
...
...
@@ -207,36 +210,8 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'mothername'
,
$name
);
return
$this
;
}
/*
public function getAddress() {
return $this->get('address')->value;
}
public function setAddress($name) {
$this->set('address', $name);
return $this;
}
public function getAddresstk() {
return $this->get('addresstk')->value;
}
public function setAddresstk($name) {
$this->set('addresstk', $name);
return $this;
}
public function getAddressarea() {
return $this->get('addressarea')->value;
}
public function setAddressarea($name) {
$this->set('addressarea', $name);
return $this;
}
*/
public
function
getAccesstoken
()
{
return
$this
->
get
(
'accesstoken'
)
->
value
;
}
...
...
@@ -245,7 +220,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'accesstoken'
,
$name
);
return
$this
;
}
public
function
getAuthtoken
()
{
return
$this
->
get
(
'authtoken'
)
->
value
;
}
...
...
@@ -254,7 +229,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'authtoken'
,
$name
);
return
$this
;
}
public
function
getTimelogin
()
{
return
$this
->
get
(
'timelogin'
)
->
value
;
}
...
...
@@ -263,7 +238,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'timelogin'
,
$name
);
return
$this
;
}
public
function
getTimeregistration
()
{
return
$this
->
get
(
'timeregistration'
)
->
value
;
}
...
...
@@ -272,7 +247,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'timeregistration'
,
$name
);
return
$this
;
}
public
function
getTimetokeninvalid
()
{
return
$this
->
get
(
'timetokeninvalid'
)
->
value
;
}
...
...
@@ -281,7 +256,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
$this
->
set
(
'timetokeninvalid'
,
$name
);
return
$this
;
}
public
function
getUserip
()
{
return
$this
->
get
(
'userip'
)
->
value
;
}
...
...
@@ -291,10 +266,38 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
return
$this
;
}
public
function
getRequestToken
()
{
return
$this
->
get
(
'requesttoken'
)
->
value
;
}
public
function
setRequestToken
(
$requestToken
)
{
$this
->
set
(
'requesttoken'
,
$requestToken
);
return
$this
;
}
public
function
getRequestTokenSecret
()
{
return
$this
->
get
(
'requesttokensecret'
)
->
value
;
}
public
function
setRequestTokenSecret
(
$requestTokenSecret
)
{
$this
->
set
(
'requesttokensecret'
,
$requestTokenSecret
);
return
$this
;
}
public
function
getAccessTokenSecret
()
{
return
$this
->
get
(
'accesstokensecret'
)
->
value
;
}
public
function
setAccessTokenSecret
(
$accessTokenSecret
)
{
$this
->
set
(
'accesstokensecret'
,
$accessTokenSecret
);
return
$this
;
}
/**
* {@inheritdoc}
*/
public
static
function
baseFieldDefinitions
(
EntityTypeInterface
$entity_type
)
{
$fields
=
parent
::
baseFieldDefinitions
(
$entity_type
);
...
...
@@ -348,8 +351,8 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'taxis_userid'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'User id χρήστη από taxis'
))
->
setDescription
(
t
(
'Δώσε το user id του χρήστη από taxis.'
))
...
...
@@ -369,7 +372,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'taxis_taxid'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Tax id χρήστη'
))
->
setDescription
(
t
(
'Δώσε το tax id / ΑΦΜ του χρήστη.'
))
...
...
@@ -390,7 +393,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'name'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Όνομα χρήστη'
))
->
setDescription
(
t
(
'Δώσε το όνομα χρήστη'
))
...
...
@@ -411,7 +414,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'surname'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Επώνυμο χρήστη'
))
->
setDescription
(
t
(
'Δώσε το επώνυμο του χρήστη.'
))
...
...
@@ -432,7 +435,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'fathername'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Όνομα πατέρα χρήστη'
))
->
setDescription
(
t
(
'Δώσε το όνομα του πατέρα του χρήστη.'
))
...
...
@@ -452,7 +455,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'mothername'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Όνομα μητέρας χρήστη'
))
->
setDescription
(
t
(
'Δώσε το όνομα της μητέρας χρήστη.'
))
...
...
@@ -472,74 +475,12 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
/*
$fields['address'] = BaseFieldDefinition::create('string')
->setLabel(t('Διεύθυνση κατοικίας'))
->setDescription(t('Δώσε τη διεύθυνση κατοικίας.'))
->setSettings(array(
'max_length' => 50,
'text_processing' => 0,
))
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['addresstk'] = BaseFieldDefinition::create('string')
->setLabel(t('ΤΚ'))
->setDescription(t('Δώσε τον ΤΚ κατοικίας.'))
->setSettings(array(
'max_length' => 20,
'text_processing' => 0,
))
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['addressarea'] = BaseFieldDefinition::create('string')
->setLabel(t('Πόλη/Περιοχή διεύθυνσης κατοικίας'))
->setDescription(t('Δώσε την πόλη/περιοχή διεύθυνσης.'))
->setSettings(array(
'max_length' => 50,
'text_processing' => 0,
))
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
*/
$fields
[
'accesstoken'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Access-Token από taxis'
))
->
setDescription
(
t
(
'Access-Token από taxis.'
))
->
setSettings
(
array
(
'max_length'
=>
3
00
,
'max_length'
=>
10
00
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
...
...
@@ -554,12 +495,32 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'accesstoken_secret'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Access-Token Secret από taxis'
))
->
setDescription
(
t
(
'Access-Token Secret από taxis.'
))
->
setSettings
(
array
(
'max_length'
=>
1000
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'authtoken'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Authorization Token'
))
->
setDescription
(
t
(
'Authorization Token που δημιουργείται από την εφαρμογή.'
))
->
setSettings
(
array
(
'max_length'
=>
3
00
,
'max_length'
=>
10
00
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
...
...
@@ -574,17 +535,57 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'requesttoken'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Oauth Request Token'
))
->
setDescription
(
t
(
'Request Token received by service provider.'
))
->
setSettings
(
array
(
'max_length'
=>
1000
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'requesttoken_secret'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Oauth Request Token Secret'
))
->
setDescription
(
t
(
'Request Token Secret received by service provider.'
))
->
setSettings
(
array
(
'max_length'
=>
1000
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'timelogin'
]
=
BaseFieldDefinition
::
create
(
'timestamp'
)
->
setLabel
(
t
(
'timeLogin'
))
->
setDescription
(
t
(
'timeLogin.'
))
;
$fields
[
'timeregistration'
]
=
BaseFieldDefinition
::
create
(
'timestamp'
)
->
setLabel
(
t
(
'timeRegistration'
))
->
setDescription
(
t
(
'timeRegistration.'
))
;
$fields
[
'timetokeninvalid'
]
=
BaseFieldDefinition
::
create
(
'integer'
)
->
setLabel
(
t
(
'Χρόνος σε min'
))
->
setDescription
(
t
(
'Χρόνος σε min μετά τον οποίο γίνεται το token ανενεργό.'
))
...
...
@@ -595,13 +596,15 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'integer'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'integer'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'userip'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'userIP'
))
->
setDescription
(
t
(
'userIP.'
))
...
...
@@ -621,7 +624,7 @@ class EpalUsers extends ContentEntityBase implements EpalUsersInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'status'
]
=
BaseFieldDefinition
::
create
(
'boolean'
)
->
setLabel
(
t
(
'Publishing status'
))
->
setDescription
(
t
(
'A boolean indicating whether the Epal users is published.'
))
...
...
drupal/modules/oauthost/config/install/oauthost.settings.yml
0 → 100644
View file @
be16673c
drupal/modules/oauthost/oauthost.links.action.yml
0 → 100644
View file @
be16673c
entity.oauthost_config.add_form
:
route_name
:
entity.oauthost_config.add_form
title
:
'
Add
OAuthOST
Config'
appears_on
:
-
entity.oauthost_config.collection
entity.oauthost_session.add_form
:
route_name
:
entity.oauthost_session.add_form
title
:
'
Add
OAuthOST
Session'
appears_on
:
-
entity.oauthost_session.collection
drupal/modules/oauthost/oauthost.links.menu.yml
0 → 100644
View file @
be16673c
# OAuthOST Config menu items definition
entity.oauthost_config.collection
:
title
:
'
OAuthOST
Config
list'
route_name
:
entity.oauthost_config.collection
description
:
'
List
OAuthOST
Config
entities'
parent
:
system.admin_structure
weight
:
100
oauthost_config.admin.structure.settings
:
title
:
OAuthOST Config settings
description
:
'
Configure
OAuthOST
Config
entities'
route_name
:
oauthost_config.settings
parent
:
system.admin_structure
# OAuthOST Session menu items definition
entity.oauthost_session.collection
:
title
:
'
OAuthOST
Session
list'
route_name
:
entity.oauthost_session.collection
description
:
'
List
OAuthOST
Session
entities'
parent
:
system.admin_structure
weight
:
100
oauthost_session.admin.structure.settings
:
title
:
OAuthOST Session settings
description
:
'
Configure
OAuthOST
Session
entities'
route_name
:
oauthost_session.settings
parent
:
system.admin_structure
drupal/modules/oauthost/oauthost.links.task.yml
0 → 100644
View file @
be16673c
# OAuthOST Config routing definition
oauthost_config.settings_tab
:
route_name
:
oauthost_config.settings
title
:
'
Settings'
base_route
:
oauthost_config.settings
entity.oauthost_config.canonical
:
route_name
:
entity.oauthost_config.canonical
base_route
:
entity.oauthost_config.canonical
title
:
'
View'