@amedia/user 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eik/eik.json +10 -0
- package/.eik/eik.tgz +0 -0
- package/.eik/integrity.json +6 -6
- package/.eik/user.js +2 -0
- package/.eik/user.js.map +1 -0
- package/README.md +67 -22
- package/dist/index.js +1 -1
- package/eik.json +1 -1
- package/package.json +4 -3
- package/src/actions/authentication.spec.ts +4 -3
- package/src/actions/authentication.ts +3 -1
- package/amedia-user-js.iml +0 -9
|
@@ -9,6 +9,7 @@ import restoreAllMocks = jest.restoreAllMocks;
|
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
11
|
restoreAllMocks();
|
|
12
|
+
spyOn(url, 'getCurrentPublicationDomain').and.returnValue('www.telen.no');
|
|
12
13
|
});
|
|
13
14
|
|
|
14
15
|
describe('authentication', () => {
|
|
@@ -18,7 +19,7 @@ describe('authentication', () => {
|
|
|
18
19
|
spyOn(location, 'navigateTo');
|
|
19
20
|
login('current');
|
|
20
21
|
expect(location.navigateTo).toHaveBeenCalledWith(
|
|
21
|
-
'https://www.aid.no.localhost.api.no/aid/logg_inn/?requestedUrl=current'
|
|
22
|
+
'https://www.aid.no.localhost.api.no/aid/logg_inn/www.telen.no/?requestedUrl=current'
|
|
22
23
|
);
|
|
23
24
|
});
|
|
24
25
|
it('should resolve snap5 env', () => {
|
|
@@ -26,7 +27,7 @@ describe('authentication', () => {
|
|
|
26
27
|
spyOn(location, 'navigateTo');
|
|
27
28
|
login('current');
|
|
28
29
|
expect(location.navigateTo).toHaveBeenCalledWith(
|
|
29
|
-
'https://www-snap5.aid.no/aid/logg_inn/?requestedUrl=current'
|
|
30
|
+
'https://www-snap5.aid.no/aid/logg_inn/www.telen.no/?requestedUrl=current'
|
|
30
31
|
);
|
|
31
32
|
});
|
|
32
33
|
it('should resolve prod env', () => {
|
|
@@ -34,7 +35,7 @@ describe('authentication', () => {
|
|
|
34
35
|
spyOn(location, 'navigateTo');
|
|
35
36
|
login('current');
|
|
36
37
|
expect(location.navigateTo).toHaveBeenCalledWith(
|
|
37
|
-
'https://www.aid.no/aid/logg_inn/?requestedUrl=current'
|
|
38
|
+
'https://www.aid.no/aid/logg_inn/www.telen.no/?requestedUrl=current'
|
|
38
39
|
);
|
|
39
40
|
});
|
|
40
41
|
});
|
|
@@ -13,7 +13,9 @@ import store from '../store';
|
|
|
13
13
|
import { navigateTo } from '../utils/location';
|
|
14
14
|
|
|
15
15
|
export const login = (requestedUrl: URL | string) => {
|
|
16
|
-
const url = new URL(
|
|
16
|
+
const url = new URL(
|
|
17
|
+
`https://${getAidDomain()}/aid/logg_inn/${getCurrentPublicationDomain()}/`
|
|
18
|
+
);
|
|
17
19
|
url.searchParams.set(
|
|
18
20
|
'requestedUrl',
|
|
19
21
|
requestedUrl instanceof URL
|
package/amedia-user-js.iml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$" />
|
|
6
|
-
<orderEntry type="inheritedJdk" />
|
|
7
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
-
</component>
|
|
9
|
-
</module>
|