diff --git a/src/app/[locale]/requests/page.tsx b/src/app/[locale]/requests/page.tsx
index 517e53195..c7a2c560c 100644
--- a/src/app/[locale]/requests/page.tsx
+++ b/src/app/[locale]/requests/page.tsx
@@ -15,7 +15,7 @@ export const metadata: Metadata = {
title: 'Requests',
}
-async function RequestsPage() {
+function RequestsPage(): JSX.Element {
return
}
diff --git a/src/app/api/auth/[...nextauth]/sw360OauthPwdGrantTypeOption.ts b/src/app/api/auth/[...nextauth]/sw360OauthPwdGrantTypeOption.ts
index 426347b2b..8435c8790 100644
--- a/src/app/api/auth/[...nextauth]/sw360OauthPwdGrantTypeOption.ts
+++ b/src/app/api/auth/[...nextauth]/sw360OauthPwdGrantTypeOption.ts
@@ -68,4 +68,4 @@ const sw360OauthPwdGrantTypeOption: NextAuthOptions = {
},
}
-export default sw360OauthPwdGrantTypeOption
\ No newline at end of file
+export default sw360OauthPwdGrantTypeOption
diff --git a/src/app/api/session/route.ts b/src/app/api/session/route.ts
index 970bbfa98..7b64bba51 100644
--- a/src/app/api/session/route.ts
+++ b/src/app/api/session/route.ts
@@ -12,7 +12,7 @@ import { getServerSession } from 'next-auth'
import { NextResponse } from 'next/server'
import authOptions from '../auth/[...nextauth]/authOptions'
-export async function GET() {
+export async function GET(): Promise {
const session = await getServerSession(authOptions)
if (!session) {
@@ -20,8 +20,7 @@ export async function GET() {
}
return NextResponse.json({
- authenticated: !!session,
+ authenticated: true,
session,
})
}
-1
diff --git a/src/services/auth.service.ts b/src/services/auth.service.ts
index f7df868b8..14057fcc0 100644
--- a/src/services/auth.service.ts
+++ b/src/services/auth.service.ts
@@ -15,26 +15,26 @@ const generateToken = async (userData: UserCredentialInfo): Promise
+ const oauth_clients = (await response.json()) as Array
oAuthClient = oauth_clients[0]
}
-
+
if (oAuthClient == null) {
return null
}
-
+
credentials = Buffer.from(`${oAuthClient.client_id}:${oAuthClient.client_secret}`, `binary`).toString('base64')
-
+
opts.headers['Authorization'] = `Basic ${credentials}`
const authorizationURL: string =
SW360_API_URL +
@@ -42,14 +42,15 @@ const generateToken = async (userData: UserCredentialInfo): Promise {
}
// convenience methods
-function success(message: string, options?: MessageOptions | undefined): void {
+function success(message: string, options?: MessageOptions): void {
showMessage(MessageType.Success, message, 'Success', options)
}
-function error(message: string, options?: MessageOptions | undefined): void {
+function error(message: string, options?: MessageOptions): void {
showMessage(MessageType.Error, message, 'Error', options)
}
-function info(message: string, options?: MessageOptions | undefined): void {
+function info(message: string, options?: MessageOptions): void {
showMessage(MessageType.Info, message, 'Info', options)
}