Skip to content

Commit 94e6ae1

Browse files
committed
Implement submodule sso (#11)
* Add Link to user login block * Make sure that we do not allow to login for blocked user * Alter user login form
1 parent 42f9df8 commit 94e6ae1

File tree

5 files changed

+384
-1
lines changed

5 files changed

+384
-1
lines changed

githubapi.info

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name = githubapi
22
description = Github API integration.
33
backdrop = 1.x
4-
version = 1.x-1.0
54
package = API
65
configure = admin/config/system/githubapi
76
type = module

githubapi.module

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ define('GITHUB_SCOPE', 'user:email,repo,admin:repo_hook,read:org,admin:org_hook'
1616
define('GITHUB_HOOK_NAME', 'web');
1717
define('GITHUB_PAYLOAD_PATH', 'githubapi/payload');
1818
define('GITHUB_PAYLOAD_CONTENT_TYPE', 'json');
19+
define('GITHUB_API_USER_AGENT', 'Backdrop CMS GitHub API module');
1920

2021
/**
2122
* Implements hook_config_info().

githubapi_sso/githubapi_sso.info

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name = githubapi sso
2+
description = SSO via Github API integration.
3+
backdrop = 1.x
4+
package = API
5+
type = module
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* @file
4+
* Install, update, and uninstall functions for the githubapi sso module.
5+
*/
6+
7+
/**
8+
* Implements hook_schema().
9+
*/
10+
function githubapi_sso_schema() {
11+
$schema['githubapi_sso_login'] = array(
12+
'description' => 'If github login does not match users.name, we store github login here.',
13+
'fields' => array(
14+
'uid' => array(
15+
'type' => 'int',
16+
'unsigned' => TRUE,
17+
'not null' => TRUE,
18+
),
19+
'name' => array(
20+
'type' => 'varchar',
21+
'length' => 255,
22+
'not null' => TRUE,
23+
'default' => '',
24+
),
25+
),
26+
'primary key' => array('uid'),
27+
);
28+
return $schema;
29+
}

0 commit comments

Comments
 (0)