mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
SSO: decode token before auth request
This commit is contained in:
parent
adfe3747d5
commit
728ec7bc94
3 changed files with 2 additions and 5 deletions
|
@ -35,11 +35,9 @@ export default Base.extend({
|
|||
|
||||
authenticate(credentials) {
|
||||
let domain = netUtil.getSubdomain();
|
||||
|
||||
let encoded;
|
||||
|
||||
if (typeof credentials === 'object') {
|
||||
|
||||
let { password, email } = credentials;
|
||||
|
||||
if (!isPresent(password) || !isPresent(email)) {
|
||||
|
@ -51,7 +49,6 @@ export default Base.extend({
|
|||
encoded = credentials;
|
||||
} else {
|
||||
return Ember.RSVP.reject("invalid");
|
||||
|
||||
}
|
||||
|
||||
var headers = {
|
||||
|
|
|
@ -15,7 +15,7 @@ export default Ember.Route.extend({
|
|||
session: Ember.inject.service(),
|
||||
|
||||
model({ token }) {
|
||||
this.get("session").authenticate('authenticator:documize', token)
|
||||
this.get("session").authenticate('authenticator:documize', decodeURIComponent(token))
|
||||
.then(() => {
|
||||
this.transitionTo('folders.folder');
|
||||
}, () => {
|
||||
|
|
|
@ -29,7 +29,7 @@ import (
|
|||
const (
|
||||
// AppVersion does what it says
|
||||
// Note: versioning scheme is not http://semver.org
|
||||
AppVersion = "0.14.0"
|
||||
AppVersion = "0.14.1"
|
||||
)
|
||||
|
||||
var port, certFile, keyFile, forcePort2SSL string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue