Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 308225c
Merge: 5b634b6 f40fd49
Author: Martin Lindström <[email protected]>
Date:   Fri Nov 3 12:37:23 2023 +0100

    Merge pull request #213 from swedenconnect/release/1.1.1-release

    Release/1.1.1 release

commit f40fd49
Author: Martin Lindström <[email protected]>
Date:   Fri Nov 3 12:22:44 2023 +0100

    Added javadoc for 1.1.1

commit f6608ae
Author: Martin Lindström <[email protected]>
Date:   Fri Nov 3 12:22:09 2023 +0100

    1.1.1

commit 5b634b6
Merge: 97ff378 0900ed2
Author: Martin Lindström <[email protected]>
Date:   Fri Nov 3 12:12:21 2023 +0100

    Merge pull request #211 from swedenconnect/bugfix/IS-205-redis-cluster-configuration

    Bugfix/is 205 redis cluster configuration

commit 0900ed2
Author: Martin Lindström <[email protected]>
Date:   Fri Nov 3 12:11:20 2023 +0100

    IS-205 Cleaned up code and documentation.

commit 97ff378
Merge: 8097b43 394f517
Author: Martin Lindström <[email protected]>
Date:   Fri Nov 3 11:08:48 2023 +0100

    Merge pull request #212 from swedenconnect/bugfix/IS-208-unknown-relying-parties

    Adds error mapping for NoSuchRelyingPartyException + handles api errors in frontend for /api/ui

commit 394f517
Author: Martin Lindström <[email protected]>
Date:   Fri Nov 3 11:07:51 2023 +0100

    IS-208 Restored change in metadata

commit 95e064b
Author: Mattias Kesti <[email protected]>
Date:   Thu Nov 2 13:57:21 2023 +0100

    Prettier formatting

commit 4198933
Author: Mattias Kesti <[email protected]>
Date:   Thu Nov 2 13:56:41 2023 +0100

    Update messages link in documentation

commit dd5da6a
Author: Felix Hellman <[email protected]>
Date:   Thu Nov 2 13:46:31 2023 +0100

    Remove unused parameter

commit 75b6ce4
Author: Felix Hellman <[email protected]>
Date:   Thu Nov 2 13:45:01 2023 +0100

    Adds error mapping for NoSuchRelyingPartyException + handles api errors in frontend for /api/ui

commit 302eea4
Author: Felix Hellman <[email protected]>
Date:   Thu Nov 2 13:07:32 2023 +0100

    Fixes copyright date in header

commit 3317c73
Author: Felix Hellman <[email protected]>
Date:   Thu Nov 2 13:03:51 2023 +0100

    Remove cluster properties from local profile

commit c12d0e4
Author: Felix Hellman <[email protected]>
Date:   Thu Nov 2 13:01:59 2023 +0100

    Adds configuration for redis cluster

    Adds runnable dev environment using redis cluster
    Adds nat translation property for redis cluster

commit 8097b43
Merge: 1aa1fb8 6ec927b
Author: Martin Lindström <[email protected]>
Date:   Wed Nov 1 15:32:46 2023 +0100

    Merge pull request #210 from swedenconnect/bugfix/IS-207-override-or-disable-the-default-logo-in-the-header

    IS-207: Override or disable the default logo in the header

commit 6ec927b
Author: Mattias Kesti <[email protected]>
Date:   Wed Nov 1 15:29:22 2023 +0100

    Hide header if no logo

commit f576eb8
Author: Mattias Kesti <[email protected]>
Date:   Wed Nov 1 14:46:57 2023 +0100

    Remove unused Sweden Connect logos

commit b79b1aa
Author: Mattias Kesti <[email protected]>
Date:   Wed Nov 1 14:46:41 2023 +0100

    Keep header size stable while waiting for logo

commit 6e93ed7
Author: Mattias Kesti <[email protected]>
Date:   Wed Nov 1 14:45:59 2023 +0100

    Don't use Sweden Connect fallback logo

commit 1aa1fb8
Merge: 09bc2d9 23b7ee8
Author: Martin Lindström <[email protected]>
Date:   Wed Nov 1 13:37:39 2023 +0100

    Merge branch 'fixbranch-1.1' of https://github.com/swedenconnect/bankid-saml-idp into fixbranch-1.1

commit 09bc2d9
Author: Martin Lindström <[email protected]>
Date:   Wed Nov 1 13:37:35 2023 +0100

    Fixed documentation typo

commit 23b7ee8
Merge: b1f48df a9258a5
Author: Martin Lindström <[email protected]>
Date:   Wed Nov 1 13:07:19 2023 +0100

    Merge pull request #209 from swedenconnect/bugfix/IS-206-ui-override-npe

    IS-206 Protect bad config from leading to NPE

commit a9258a5
Author: Martin Lindström <[email protected]>
Date:   Wed Nov 1 13:06:52 2023 +0100

    IS-206 Bumped versions

commit ca32cd5
Author: Martin Lindström <[email protected]>
Date:   Wed Nov 1 13:03:20 2023 +0100

    IS-206 Protect bad config from leading to NPE

commit 170e8fe
Author: Felix Hellman <[email protected]>
Date:   Mon Oct 30 15:51:23 2023 +0100

    Redisson Cluster Configuration
  • Loading branch information
martin-lindstrom committed Nov 3, 2023
1 parent 45bf441 commit a831eb0
Show file tree
Hide file tree
Showing 456 changed files with 2,855 additions and 1,419 deletions.
2 changes: 1 addition & 1 deletion bankid-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>se.swedenconnect.bankid</groupId>
<artifactId>saml-bankid-idp-parent</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</parent>

<name>Sweden Connect :: BankID :: Relying Party API</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class LibraryVersion {

private static final int MAJOR = 1;
private static final int MINOR = 1;
private static final int PATCH = 0;
private static final int PATCH = 1;

/**
* Global serialization value for classes.
Expand Down
2 changes: 1 addition & 1 deletion bankid-frontend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>se.swedenconnect.bankid</groupId>
<artifactId>saml-bankid-idp-parent</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</parent>

<name>Sweden Connect :: BankID :: SAML Identity Provider :: Frontend Distribution</name>
Expand Down
15 changes: 11 additions & 4 deletions bankid-frontend/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
<script setup lang="ts">
import { onBeforeMount, ref } from 'vue';
import { computed, onBeforeMount, ref } from 'vue';
import AppFooter from '@/components/AppFooter.vue';
import AppHeader from '@/components/AppHeader.vue';
import CustomContent from '@/components/CustomContent.vue';
import LocaleChanger from '@/components/LocaleChanger.vue';
import { selectedDevice, uiInformation } from '@/Service';
import { handleApiError, isUserErrorResponse, selectedDevice, uiInformation } from '@/Service';
import type { SelectedDeviceInformation, UiInformation } from '@/types';
const uiInfo = ref<UiInformation>();
const device = ref<SelectedDeviceInformation>();
const logo = computed(() => uiInfo.value?.sp?.imageUrl);
onBeforeMount(async () => {
uiInfo.value = await uiInformation();
var information = await uiInformation();
if (isUserErrorResponse(information)) {
handleApiError(information);
} else {
uiInfo.value = information;
}
device.value = await selectedDevice();
});
</script>

<template>
<AppHeader :sp-info="uiInfo?.sp" />
<AppHeader v-if="logo" :logo="logo" />
<LocaleChanger />
<main class="main-width">
<CustomContent position="above" />
Expand Down
29 changes: 18 additions & 11 deletions bankid-frontend/src/Service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import type {
ApiResponseStatus,
CustomerContactInformation,
RetryResponse,
SelectedDeviceInformation, SessionExpiredResponse, UserErrorResponse,
SelectedDeviceInformation,
SessionExpiredResponse,
Status,
UiInformation,
UserErrorResponse,
} from './types';

const CONTEXT_PATH = import.meta.env.BASE_URL;
Expand All @@ -27,7 +29,7 @@ export async function poll(showQr: boolean) {
return { retry: true, time: retryAfter } as RetryResponse;
}
if (response.status === 403) {
return {"sessionExpired": true } as SessionExpiredResponse;
return { sessionExpired: true } as SessionExpiredResponse;
}
if (response.status === 400) {
return data as UserErrorResponse;
Expand All @@ -48,7 +50,7 @@ function isSessionExpiredResponse(obj: any): obj is SessionExpiredResponse {
return obj && 'sessionExpired' in obj;
}

function isUserErrorResponse(obj: any): obj is UserErrorResponse {
export function isUserErrorResponse(obj: any): obj is UserErrorResponse {
return obj && 'errorMessage' in obj;
}

Expand Down Expand Up @@ -77,6 +79,15 @@ export const pollingAutoStart = (
});
};

export function handleApiError(response: UserErrorResponse) {
console.log('User error!');
let location = import.meta.env.BASE_URL + '/bankid#/error/' + response.errorMessage;
if (response.traceId !== '') {
location = location + '/' + response.traceId;
}
window.location.href = location;
}

const handleResponse = (
response: ApiResponse | RetryResponse | SessionExpiredResponse | UserErrorResponse,
pollFunction: () => Promise<ApiResponse | RetryResponse | SessionExpiredResponse | UserErrorResponse>,
Expand All @@ -88,15 +99,11 @@ const handleResponse = (
cancelRetry?: Ref<boolean>,
) => {
if (isSessionExpiredResponse(response)) {
window.location.href = PATHS.ERROR;
window.location.href = PATHS.ERROR;
}

if (isUserErrorResponse(response)) {
console.log("User error!");
let location = import.meta.env.BASE_URL + "/bankid#/error/" + response.errorMessage;
if (response.traceId !== "") {
location = location + "/" + response.traceId;
}
window.location.href = location;
handleApiError(response);
}

if (isApiResponse(response)) {
Expand Down Expand Up @@ -165,6 +172,6 @@ const fetchData = async (endpoint: string): Promise<any> => (await fetch(CONTEXT
export const status = async (): Promise<Status> => fetchData('/api/status');
export const contactInformation = async (): Promise<CustomerContactInformation> => fetchData('/api/contact');
export const cancel = async () => await fetch(CONTEXT_PATH + '/api/cancel', requestOptions);
export const uiInformation = async (): Promise<UiInformation> => fetchData('/api/ui');
export const uiInformation = async (): Promise<UiInformation | UserErrorResponse> => fetchData('/api/ui');
export const selectedDevice = async (): Promise<SelectedDeviceInformation> => fetchData('/api/device');
export const getOverrides = async () => await fetchData('/api/overrides');
9 changes: 0 additions & 9 deletions bankid-frontend/src/assets/logo-notext.svg

This file was deleted.

17 changes: 0 additions & 17 deletions bankid-frontend/src/assets/logo.svg

This file was deleted.

Loading

0 comments on commit a831eb0

Please sign in to comment.