37 lines
675 B
JavaScript
37 lines
675 B
JavaScript
angular.module('com.daplie.cloud', [])
|
|
.service('oauth3', function () {
|
|
var auth = window.OAUTH3.create();
|
|
auth.setProvider('oauth3.org');
|
|
return auth;
|
|
})
|
|
.controller('LoginController', ['oauth3', function (oauth3) {
|
|
var vm = this;
|
|
|
|
vm.authenticate = function () {
|
|
return oauth3.authenticate().then(function (session) {
|
|
console.info("Authorized Session", session);
|
|
});
|
|
};
|
|
|
|
}]);
|
|
/*
|
|
$(function () {
|
|
'use strict';
|
|
|
|
|
|
var ui = {
|
|
function login() {
|
|
}
|
|
};
|
|
|
|
|
|
var auth = window.OAUTH3.create();
|
|
// TODO put explicit in dns record
|
|
// TODO CCA record
|
|
auth.setProvider('oauth3.org');
|
|
|
|
$('body').on('click', '.js-login', login);
|
|
|
|
});
|
|
*/
|