Skip to content

Commit ce5b991

Browse files
committed
Added missing files from last commit
1 parent cf4a26a commit ce5b991

File tree

5 files changed

+101
-0
lines changed

5 files changed

+101
-0
lines changed

app/config/packages/artdarek/oauth-4-laravel/.gitkeep

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
return array(
4+
'consumers' => array(
5+
'GitHub' => array(
6+
'client_id' => 'c531b64426ca6f3990a5',
7+
'client_secret' => 'af86f65d5dee67b6c32f0e17ceed7c4f148eb83e',
8+
'scope' => array('user:email'),
9+
),
10+
),
11+
);
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
5+
class OauthLogin extends Migration {
6+
7+
/**
8+
* Run the migrations.
9+
*
10+
* @return void
11+
*/
12+
public function up()
13+
{
14+
Schema::create('users_social_github', function($table) {
15+
$table->increments('id');
16+
$table->integer('user_id')->unsigned();
17+
$table->string('access_token', 255);
18+
$table->string('refresh_token', 255)->nullable();
19+
$table->timestamp('end_of_life')->nullable();
20+
21+
$table->timestamps();
22+
23+
$table->foreign('user_id')->references('id')->on('users');
24+
});
25+
}
26+
27+
/**
28+
* Reverse the migrations.
29+
*
30+
* @return void
31+
*/
32+
public function down()
33+
{
34+
Schema::dropIfExists('users_social_github');
35+
}
36+
37+
}

app/models/UserGitHub.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
class UserGitHub extends Eloquent
4+
{
5+
/**
6+
* The database table used by the model.
7+
*
8+
* @var string
9+
*/
10+
protected $table = 'users_social_github';
11+
12+
protected $fillable = array(
13+
'user_id',
14+
'access_token',
15+
'refresh_token',
16+
'end_of_life',
17+
);
18+
}

app/views/user/social.blade.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@extends('layouts.master')
2+
3+
@section('title')
4+
{{ trans('user.social.title') }}
5+
@stop
6+
7+
@section('content')
8+
<h2>{{ trans('user.social.headline') }}</h2>
9+
10+
<p>
11+
{{ trans('user.social.description') }}
12+
</p>
13+
14+
{{ Form::open() }}
15+
{{ Form::hidden('access_token', $token->getAccessToken()) }}
16+
{{ Form::hidden('refresh_token', $token->getRefreshToken()) }}
17+
{{ Form::hidden('end_of_life_token', $token->getEndOfLife()) }}
18+
19+
<div class="form-group">
20+
<?php $i = 0; ?>
21+
@foreach ($emails as $email)
22+
<div class="radio">
23+
<label>
24+
<input type="radio" name="email" id="email-{{ $i }}" value="{{{ $email }}}"<?php if ($i == 0): ?> checked="checked"<?php endif; ?>> {{{ $email }}}
25+
</label>
26+
</div>
27+
<?php $i++; ?>
28+
@endforeach
29+
</div>
30+
31+
<div class="form-group">
32+
<button type="submit" class="btn btn-primary" name="register">{{ trans('user.social.submit') }}</button>
33+
</div>
34+
{{ Form::close() }}
35+
@stop

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy