Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Tools glue
ng-ebi-authorization
Commits
8f523731
Commit
8f523731
authored
Sep 24, 2018
by
Eduardo Sanz García
Browse files
chore: cleanup
parent
2a0ae6f3
Pipeline
#4535
failed with stages
in 2 minutes and 1 second
Changes
18
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
53 additions
and
54 deletions
+53
-54
angular.json
angular.json
+21
-29
package.json
package.json
+2
-2
src/app/app.component.spec.ts
src/app/app.component.spec.ts
+1
-1
src/app/app.component.ts
src/app/app.component.ts
+3
-3
src/app/app.module.ts
src/app/app.module.ts
+9
-3
src/app/modules/auth/auth.service.spec.ts
src/app/modules/auth/auth.service.spec.ts
+1
-1
src/app/modules/auth/auth.service.ts
src/app/modules/auth/auth.service.ts
+4
-2
src/app/modules/auth/token.service.spec.ts
src/app/modules/auth/token.service.spec.ts
+1
-1
src/environments/environment.ts
src/environments/environment.ts
+1
-0
src/index.html
src/index.html
+1
-1
src/karma.conf.js
src/karma.conf.js
+1
-1
src/karma_chrome.conf.js
src/karma_chrome.conf.js
+0
-0
src/karma_chromium.conf.js
src/karma_chromium.conf.js
+1
-1
src/tsconfig.app.json
src/tsconfig.app.json
+1
-3
src/tsconfig.spec.json
src/tsconfig.spec.json
+0
-2
testing/common.ts
testing/common.ts
+1
-1
tsconfig.json
tsconfig.json
+3
-1
tslint.json
tslint.json
+2
-2
No files found.
angular.json
View file @
8f523731
...
...
@@ -3,10 +3,12 @@
"version"
:
1
,
"newProjectRoot"
:
"projects"
,
"projects"
:
{
"
a
ng
ular-aap-auth
"
:
{
"ng
-ebi-authorization
"
:
{
"root"
:
""
,
"sourceRoot"
:
"src"
,
"projectType"
:
"application"
,
"prefix"
:
"auth"
,
"schematics"
:
{},
"architect"
:
{
"build"
:
{
"builder"
:
"@angular-devkit/build-angular:browser"
,
...
...
@@ -27,6 +29,12 @@
},
"configurations"
:
{
"production"
:
{
"fileReplacements"
:
[
{
"replace"
:
"src/environments/environment.ts"
,
"with"
:
"src/environments/environment.prod.ts"
}
],
"optimization"
:
true
,
"outputHashing"
:
"all"
,
"sourceMap"
:
false
,
...
...
@@ -35,44 +43,38 @@
"aot"
:
true
,
"extractLicenses"
:
true
,
"vendorChunk"
:
false
,
"buildOptimizer"
:
true
,
"fileReplacements"
:
[
{
"replace"
:
"src/environments/environment.ts"
,
"with"
:
"src/environments/environment.prod.ts"
}
]
"buildOptimizer"
:
true
}
}
},
"serve"
:
{
"builder"
:
"@angular-devkit/build-angular:dev-server"
,
"options"
:
{
"browserTarget"
:
"
a
ng
ular-aap-auth
:build"
"browserTarget"
:
"ng
-ebi-authorization
:build"
},
"configurations"
:
{
"production"
:
{
"browserTarget"
:
"
a
ng
ular-aap-auth
:build:production"
"browserTarget"
:
"ng
-ebi-authorization
:build:production"
}
}
},
"extract-i18n"
:
{
"builder"
:
"@angular-devkit/build-angular:extract-i18n"
,
"options"
:
{
"browserTarget"
:
"
a
ng
ular-aap-auth
:build"
"browserTarget"
:
"ng
-ebi-authorization
:build"
}
},
"test"
:
{
"builder"
:
"@angular-devkit/build-angular:karma"
,
"options"
:
{
"main"
:
"src/test.ts"
,
"karmaConfig"
:
"./karma.conf.js"
,
"polyfills"
:
"src/polyfills.ts"
,
"tsConfig"
:
"src/tsconfig.spec.json"
,
"
scripts"
:
[]
,
"
karmaConfig"
:
"src/karma.conf.js"
,
"styles"
:
[
"src/styles.css"
],
"scripts"
:
[],
"assets"
:
[
"src/assets"
,
"src/favicon.ico"
...
...
@@ -93,16 +95,15 @@
}
}
},
"angular-aap-auth-e2e"
:
{
"root"
:
""
,
"sourceRoot"
:
""
,
"ng-ebi-authorization-e2e"
:
{
"root"
:
"e2e/"
,
"projectType"
:
"application"
,
"architect"
:
{
"e2e"
:
{
"builder"
:
"@angular-devkit/build-angular:protractor"
,
"options"
:
{
"protractorConfig"
:
"
.
/protractor.conf.js"
,
"devServerTarget"
:
"
a
ng
ular-aap-auth
:serve"
"protractorConfig"
:
"
e2e
/protractor.conf.js"
,
"devServerTarget"
:
"ng
-ebi-authorization
:serve"
}
},
"lint"
:
{
...
...
@@ -119,14 +120,5 @@
}
}
},
"defaultProject"
:
"angular-aap-auth"
,
"schematics"
:
{
"@schematics/angular:component"
:
{
"prefix"
:
"app"
,
"styleext"
:
"css"
},
"@schematics/angular:directive"
:
{
"prefix"
:
"app"
}
}
}
\ No newline at end of file
"defaultProject"
:
"ng-ebi-authorization"
}
package.json
View file @
8f523731
...
...
@@ -6,9 +6,9 @@
"ng"
:
"ng"
,
"start"
:
"ng serve --aot"
,
"build"
:
"ng build --prod --aot"
,
"test"
:
"ng test --karma-config=karma_chrome.conf.js --watch"
,
"test"
:
"ng test --karma-config=
src/
karma_chrome.conf.js --watch"
,
"test:sr"
:
"ng test --code-coverage=true --progress=false"
,
"test:sr:chromium"
:
"ng test --code-coverage=true --progress=false --karma-config=karma_chromium.conf.js"
,
"test:sr:chromium"
:
"ng test --code-coverage=true --progress=false --karma-config=
src/
karma_chromium.conf.js"
,
"lint"
:
"ng lint"
,
"docs"
:
"typedoc --module amd --out docs/ src/public_api.ts"
,
"e2e"
:
"ng e2e"
,
...
...
src/app/app.component.spec.ts
View file @
8f523731
...
...
@@ -12,7 +12,7 @@ import {
}
from
'
./app.component
'
;
import
{
CommonStub
}
from
'
app/../../
testing/common
'
;
}
from
'
testing/common
'
;
describe
(
'
AppComponent
'
,
()
=>
{
beforeEach
(
async
(()
=>
{
...
...
src/app/app.component.ts
View file @
8f523731
...
...
@@ -12,16 +12,16 @@ import {
import
{
AuthService
,
User
}
from
'
app
/modules/auth/auth.service
'
;
}
from
'
.
/modules/auth/auth.service
'
;
import
{
TokenService
}
from
'
app
/modules/auth/token.service
'
;
}
from
'
.
/modules/auth/token.service
'
;
import
{
JwtHelperService
,
}
from
'
@auth0/angular-jwt
'
;
@
Component
({
selector
:
'
a
pp
-root
'
,
selector
:
'
a
uth
-root
'
,
templateUrl
:
'
./app.component.html
'
,
styleUrls
:
[
'
./app.component.css
'
]
})
...
...
src/app/app.module.ts
View file @
8f523731
...
...
@@ -5,9 +5,10 @@ import {
NgModule
}
from
'
@angular/core
'
;
// Modules
import
{
AppCompon
ent
}
from
'
./app.comp
onent
'
;
environm
ent
}
from
'
src/environments/envir
on
m
ent
'
;
import
{
AuthModule
}
from
'
./modules/auth/auth.module
'
;
...
...
@@ -15,6 +16,11 @@ import {
JwtModule
}
from
'
@auth0/angular-jwt
'
;
// Components
import
{
AppComponent
}
from
'
./app.component
'
;
export
function
getToken
():
string
{
return
localStorage
.
getItem
(
'
jwt_token
'
)
||
''
;
}
...
...
@@ -33,7 +39,7 @@ export function removeToken(): void {
imports
:
[
BrowserModule
,
AuthModule
.
forRoot
({
aapURL
:
'
https://api.aai.ebi.ac.uk
'
,
aapURL
:
environment
.
aapURL
,
tokenGetter
:
getToken
,
tokenUpdater
:
updateToken
,
// tokenRemover: removeToken // Optional
...
...
src/app/modules/auth/auth.service.spec.ts
View file @
8f523731
...
...
@@ -18,7 +18,7 @@ import {
import
{
VALID_TOKEN
,
EXPIRED_TOKEN
}
from
'
app/../../
testing/tokens
'
;
}
from
'
testing/tokens
'
;
import
{
AAP_CONFIG
,
DEFAULT_CONF
...
...
src/app/modules/auth/auth.service.ts
View file @
8f523731
...
...
@@ -158,7 +158,7 @@ export class AuthService {
* @returns The SSO URL.
*
*/
public
getSSOURL
(
options
?:
LoginOptions
):
string
{
public
getSSOURL
(
options
?:
LoginOptions
):
string
{
let
extra
=
''
;
if
(
options
)
{
this
.
_filterLoginOptions
(
options
);
...
...
@@ -270,7 +270,9 @@ export class AuthService {
return
;
}
this
.
_storageUpdater
(
event
.
data
);
event
.
source
.
close
();
if
(
event
.
source
)
{
event
.
source
.
close
();
}
this
.
_updateUser
();
// Triggers updating other windows
...
...
src/app/modules/auth/token.service.spec.ts
View file @
8f523731
...
...
@@ -13,7 +13,7 @@ import {
import
{
VALID_TOKEN
,
EXPIRED_TOKEN
}
from
'
app/../../
testing/tokens
'
;
}
from
'
testing/tokens
'
;
describe
(
'
TokenService (valid token)
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
src/environments/environment.ts
View file @
8f523731
...
...
@@ -4,5 +4,6 @@
// The list of which env maps to which file can be found in `.angular-cli.json`.
export
const
environment
=
{
aapURL
:
'
https://api.aai.ebi.ac.uk
'
,
production
:
false
};
src/index.html
View file @
8f523731
...
...
@@ -9,6 +9,6 @@
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.ico"
>
</head>
<body>
<a
pp
-root></a
pp
-root>
<a
uth
-root></a
uth
-root>
</body>
</html>
karma.conf.js
→
src/
karma.conf.js
View file @
8f523731
...
...
@@ -20,7 +20,7 @@ module.exports = function (config) {
clearContext
:
false
// leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter
:
{
dir
:
require
(
'
path
'
).
join
(
__dirname
,
'
coverage
'
),
dir
:
require
(
'
path
'
).
join
(
__dirname
,
'
../
coverage
'
),
reports
:
[
'
text-summary
'
,
'
text
'
,
'
html
'
,
'
lcovonly
'
],
fixWebpackSourcePaths
:
true
},
...
...
karma_chrome.conf.js
→
src/
karma_chrome.conf.js
View file @
8f523731
File moved
karma_chromium.conf.js
→
src/
karma_chromium.conf.js
View file @
8f523731
...
...
@@ -20,7 +20,7 @@ module.exports = function (config) {
clearContext
:
false
// leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter
:
{
dir
:
require
(
'
path
'
).
join
(
__dirname
,
'
coverage
'
),
dir
:
require
(
'
path
'
).
join
(
__dirname
,
'
../
coverage
'
),
reports
:
[
'
text-summary
'
,
'
text
'
,
'
html
'
,
'
lcovonly
'
],
fixWebpackSourcePaths
:
true
},
...
...
src/tsconfig.app.json
View file @
8f523731
...
...
@@ -2,12 +2,10 @@
"extends"
:
"../tsconfig.json"
,
"compilerOptions"
:
{
"outDir"
:
"../out-tsc/app"
,
"baseUrl"
:
"./"
,
"module"
:
"es2015"
,
"types"
:
[]
},
"exclude"
:
[
"test.ts"
,
"
src/
test.ts"
,
"**/*.spec.ts"
]
}
src/tsconfig.spec.json
View file @
8f523731
...
...
@@ -2,8 +2,6 @@
"extends"
:
"../tsconfig.json"
,
"compilerOptions"
:
{
"outDir"
:
"../out-tsc/spec"
,
"baseUrl"
:
"./"
,
"module"
:
"commonjs"
,
"types"
:
[
"jasmine"
,
"node"
...
...
testing/common.ts
View file @
8f523731
...
...
@@ -7,7 +7,7 @@ import {
}
from
'
@auth0/angular-jwt
'
;
import
{
AuthModule
}
from
'
../
src/app/modules/auth/auth.module
'
;
}
from
'
src/app/modules/auth/auth.module
'
;
export
const
jwt_token
=
'
test
'
;
export
function
getToken
():
string
{
...
...
tsconfig.json
View file @
8f523731
{
"compileOnSave"
:
false
,
"angularCompilerOptions"
:
{
"preserveWhitespaces"
:
false
"preserveWhitespaces"
:
"off"
},
"compilerOptions"
:
{
"baseUrl"
:
"./"
,
"outDir"
:
"./dist/out-tsc"
,
"sourceMap"
:
true
,
"declaration"
:
false
,
"module"
:
"es2015"
,
"moduleResolution"
:
"node"
,
"emitDecoratorMetadata"
:
true
,
"experimentalDecorators"
:
true
,
...
...
tslint.json
View file @
8f523731
...
...
@@ -120,13 +120,13 @@
"directive-selector"
:
[
true
,
"attribute"
,
"a
pp
"
,
"a
uth
"
,
"camelCase"
],
"component-selector"
:
[
true
,
"element"
,
"a
pp
"
,
"a
uth
"
,
"kebab-case"
],
"no-output-on-prefix"
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment