Swapped custom auth for component.

This commit is contained in:
Matthew Dillon 2015-03-23 14:17:57 -08:00
parent 8dbd01c7b1
commit 8e37bce7c7
8 changed files with 33 additions and 82 deletions

View file

@ -22,13 +22,26 @@ module.exports = function(environment) {
if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
ENV.APP.LOG_TRANSITIONS = true;
ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_VIEW_LOOKUPS = true;
ENV['simple-auth'] = {
authorizer: 'authorizers:custom',
authorizer: 'simple-auth-authorizer:token',
crossOriginWhitelist: ['http://127.0.0.1:4200']
}
ENV['simple-auth-token'] = {
serverTokenEndpoint: '/api/authenticate',
identificationField: 'username',
passwordField: 'password',
tokenPropertyName: 'token',
authorizationPrefix: 'Bearer ',
authorizationHeaderName: 'Authorization',
refreshAccessTokens: true,
serverTokenRefreshEndpoint: '/api/authenticate',
tokenExpireName: 'exp',
refreshLeeway: 300,
timeFactor: 1
}
ENV.apiURL = 'http://127.0.0.1:4200';
ENV.contentSecurityPolicy = {
'default-src': "'none'",