-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http-gateway/web: Added handling for error 401 (Unauthorized) #1330
Conversation
+ typo fix
+ typo fix
+ typo fix
WalkthroughThis update primarily addresses typo corrections in function calls, ensuring the correct methods are invoked throughout the codebase. Additionally, it introduces the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range and nitpick comments (11)
http-gateway/web/src/containers/Devices/List/ProvisionNewDevice/ProvisionNewDevice.tsx (1)
Line range hint
32-32
: Specify explicit types instead of usingany
.- const handleFetch = async () => { + const handleFetch = async (): Promise<void> => {- const { providerName } = (security.getDeviceOAuthConfig() as any) || {} + const { providerName } = (security.getDeviceOAuthConfig() as Record<string, any>) || {}Using explicit types instead of
any
improves type safety and code maintainability.Also applies to: 63-63
Tools
Biome
[error] 63-63: Unexpected any. Specify a different type.
http-gateway/web/src/containers/DeviceProvisioning/EnrollmentGroups/NewEnrollmentGroupsPage/NewEnrollmentGroupsPage.tsx (1)
Line range hint
28-28
: Specify explicit types instead of usingany
.- const NewEnrollmentGroupsPage: FC<any> = () => { + const NewEnrollmentGroupsPage: FC<Props> = () => {- const defaultFormData = { + const defaultFormData: FormData = {- const onSubmit = async () => { + const onSubmit = async (): Promise<void> => {- const context = useMemo( + const context: FormContextType = useMemo(Using explicit types instead of
any
improves type safety and code maintainability.Also applies to: 65-65, 94-94, 110-110
http-gateway/web/src/containers/Devices/hooks.ts (1)
Line range hint
26-26
: Specify explicit types instead of usingany
.- const useEmitter(DEVICES_STATUS_WS_KEY, (newDeviceData: any) => { + const useEmitter(DEVICES_STATUS_WS_KEY, (newDeviceData: DeviceDataType) => {Using explicit types instead of
any
improves type safety and code maintainability.http-gateway/web/src/containers/App/App.tsx (1)
Line range hint
31-31
: Specify explicit types instead of usingany
.- const [wellKnownConfig, setWellKnownConfig] = useState<any>(null) + const [wellKnownConfig, setWellKnownConfig] = useState<WellKnownConfigType | null>(null)- const [configError, setConfigError] = useState<any>(null) + const [configError, setConfigError] = useState<Error | null>(null)- const Wrapper = (child: any) => ( + const Wrapper = (child: ReactNode) => (Using explicit types instead of
any
improves type safety and code maintainability.Also applies to: 33-33, 119-119
http-gateway/web/src/containers/Devices/Detail/DevicesDetailsPage/DevicesDetailsPage.tsx (5)
Line range hint
168-168
: Remove the non-null assertion to prevent potential runtime errors.- const { data } = await updateDevicesResourceApi({ deviceId: id, href: href!, ttl }, { n: name }); + const { data } = await updateDevicesResourceApi({ deviceId: id, href: href, ttl }, { n: name });Ensure that
href
is checked for null or undefined before this call.
Line range hint
71-71
: Adjust the dependencies of theuseEffect
hook to match its actual usage.- }, [data, loading]) + }, [data?.metadata?.twinEnabled])This change ensures that the hook only re-runs when
data.metadata.twinEnabled
changes, which is the only piece of data it uses.
Line range hint
78-78
: Include all relevant dependencies in theuseEffect
hook.- }, []) + }, [refresh])This ensures that the hook correctly responds to changes in the
refresh
function, maintaining the integrity of the component's reactive behavior.
Line range hint
87-87
: Ensure all dependencies are specified in theuseCallback
hook.- }, [id]) + }, [id, navigate, refreshPendingCommands, refreshSoftwareUpdate])This change ensures that the hook is correctly memoized and only re-computed when any of the specified dependencies change.
Line range hint
1-1
: Useimport type
for imports that are only used as types.- import { FC, lazy, useCallback, useEffect, useState } from 'react' + import type { FC } from 'react' + import { lazy, useCallback, useEffect, useState } from 'react'This change clarifies that these imports are used for type checking only and may help optimize bundling by potentially excluding them from the runtime bundle.
Also applies to: 6-7, 14-15, 30-31
http-gateway/web/src/containers/Devices/Detail/DevicesDetailsPage/Tabs/Tab2/Tab2.tsx (2)
Line range hint
239-239
: Specify a more precise type instead ofany
.Using
any
can lead to potential type safety issues. It would be beneficial to define a more specific type forresourceDataUpdate
to enhance code robustness and maintainability.
Line range hint
1-1
: Optimize type-only imports.Consider consolidating all type-only imports using the
type
keyword to clarify that they are not used at runtime. This can help clean up the import statements and make the codebase more maintainable.- import { FC, useEffect, useMemo, useState } from 'react' + import type { FC } from 'react' + import { useEffect, useMemo, useState } from 'react' - import { useIsMounted, WellKnownConfigType } from '@shared-ui/common/hooks' + import type { WellKnownConfigType } from '@shared-ui/common/hooks' + import { useIsMounted } from '@shared-ui/common/hooks' - import { - DevicesDetailsResourceModalData, - DevicesResourcesModalParamsType, - } from '@shared-ui/components/Organisms/DevicesResourcesModal/DevicesResourcesModal.types' + import type { + DevicesDetailsResourceModalData, + DevicesResourcesModalParamsType, + } from '@shared-ui/components/Organisms/DevicesResourcesModal/DevicesResourcesModal.types'Also applies to: 5-6, 10-14, 17-18, 19-20
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (20)
- http-gateway/web/packages/shared-ui (1 hunks)
- http-gateway/web/src/containers/App/App.tsx (1 hunks)
- http-gateway/web/src/containers/App/AppInner/AppInner.tsx (5 hunks)
- http-gateway/web/src/containers/App/AppLayout/AppLayout.tsx (1 hunks)
- http-gateway/web/src/containers/Certificates/hooks.ts (1 hunks)
- http-gateway/web/src/containers/Certificates/rest.ts (1 hunks)
- http-gateway/web/src/containers/DeviceProvisioning/EnrollmentGroups/NewEnrollmentGroupsPage/NewEnrollmentGroupsPage.tsx (1 hunks)
- http-gateway/web/src/containers/DeviceProvisioning/LinkedHubs/DetailHeader/DetailHeader.tsx (1 hunks)
- http-gateway/web/src/containers/DeviceProvisioning/ProvisioningRecords/DetailPage/Tabs/Tab2/Tab2.tsx (1 hunks)
- http-gateway/web/src/containers/DeviceProvisioning/ProvisioningRecords/DetailPage/Tabs/Tab3/Tab3.tsx (1 hunks)
- http-gateway/web/src/containers/DeviceProvisioning/hooks.ts (16 hunks)
- http-gateway/web/src/containers/DeviceProvisioning/rest.ts (8 hunks)
- http-gateway/web/src/containers/Devices/Detail/DevicesDetailsPage/DevicesDetailsPage.tsx (1 hunks)
- http-gateway/web/src/containers/Devices/Detail/DevicesDetailsPage/Tabs/Tab2/Tab2.tsx (1 hunks)
- http-gateway/web/src/containers/Devices/List/ProvisionNewDevice/ProvisionNewDevice.tsx (1 hunks)
- http-gateway/web/src/containers/Devices/hooks.ts (4 hunks)
- http-gateway/web/src/containers/Devices/rest.ts (8 hunks)
- http-gateway/web/src/containers/PendingCommands/hooks.ts (1 hunks)
- http-gateway/web/src/containers/PendingCommands/rest.ts (1 hunks)
- http-gateway/web/src/containers/RemoteClients/RemoteClientsPage/RemoteClientsPage.tsx (2 hunks)
Files skipped from review due to trivial changes (1)
- http-gateway/web/packages/shared-ui
Additional context used
Biome
http-gateway/web/src/containers/Certificates/rest.ts
[error] 6-7: All these imports are only used as types.
http-gateway/web/src/containers/PendingCommands/rest.ts
[error] 4-5: All these imports are only used as types.
http-gateway/web/src/containers/Certificates/hooks.ts
[error] 6-7: All these imports are only used as types.
http-gateway/web/src/containers/PendingCommands/hooks.ts
[error] 8-9: All these imports are only used as types.
http-gateway/web/src/containers/App/AppInner/AppInner.tsx
[error] 55-70: This else clause can be omitted because previous branches break early.
[error] 7-8: Some named imports are only used as types.
[error] 9-10: All these imports are only used as types.
[error] 14-15: All these imports are only used as types.
http-gateway/web/src/containers/DeviceProvisioning/LinkedHubs/DetailHeader/DetailHeader.tsx
[error] 46-46: Unexpected any. Specify a different type.
[error] 1-1: Some named imports are only used as types.
[error] 10-11: All these imports are only used as types.
[error] 29-29: This hook does not specify all of its dependencies: _
[error] 29-29: This hook does not specify all of its dependencies: navigate
http-gateway/web/src/containers/Devices/List/ProvisionNewDevice/ProvisionNewDevice.tsx
[error] 32-32: Unexpected any. Specify a different type.
[error] 63-63: Unexpected any. Specify a different type.
http-gateway/web/src/containers/DeviceProvisioning/EnrollmentGroups/NewEnrollmentGroupsPage/NewEnrollmentGroupsPage.tsx
[error] 28-28: Unexpected any. Specify a different type.
[error] 65-65: Unexpected any. Specify a different type.
[error] 94-94: Unexpected any. Specify a different type.
[error] 110-110: Unexpected any. Specify a different type.
[error] 1-1: Some named imports are only used as types.
[error] 12-13: All these imports are only used as types.
[error] 33-33: This hook does not specify all of its dependencies: _
[error] 107-107: This hook does not specify all of its dependencies: _
[error] 107-107: This hook does not specify all of its dependencies: onSubmit
[error] 107-107: This hook does not specify all of its dependencies: onStepChange
[error] 107-107: This hook does not specify all of its dependencies: setFormData
http-gateway/web/src/containers/DeviceProvisioning/ProvisioningRecords/DetailPage/Tabs/Tab3/Tab3.tsx
[error] 22-22: Unexpected any. Specify a different type.
[error] 29-29: Unexpected any. Specify a different type.
[error] 30-30: Do not access Object.prototype method 'hasOwnProperty' from target object.
[error] 35-45: This else clause can be omitted because previous branches break early.
[error] 35-35: Do not access Object.prototype method 'hasOwnProperty' from target object.
[error] 40-45: This else clause can be omitted because previous branches break early.
[error] 40-40: Do not access Object.prototype method 'hasOwnProperty' from target object.
[error] 51-51: Unexpected any. Specify a different type.
[error] 1-1: Some named imports are only used as types.
[error] 10-11: All these imports are only used as types.
[error] 14-15: All these imports are only used as types.
[error] 28-28: This hook does not specify all of its dependencies: _
[error] 56-56: This hook does not specify all of its dependencies: _
[error] 56-56: This hook does not specify all of its dependencies: data.enrollmentGroupData?.hubsData
[error] 56-56: This hook does not specify all of its dependencies: wellKnownConfig.id
[error] 56-56: This hook does not specify all of its dependencies: data.deviceId
[error] 56-56: This hook does not specify all of its dependencies: data.ownership.owner
http-gateway/web/src/containers/DeviceProvisioning/rest.ts
[error] 136-136: Unexpected any. Specify a different type.
[error] 151-151: Unexpected any. Specify a different type.
[error] 5-6: All these imports are only used as types.
[error] 7-8: All these imports are only used as types.
http-gateway/web/src/containers/Devices/hooks.ts
[error] 26-26: Unexpected any. Specify a different type.
[error] 91-109: Prefer for...of instead of forEach.
[error] 10-11: All these imports are only used as types.
http-gateway/web/src/containers/App/App.tsx
[error] 31-31: Unexpected any. Specify a different type.
[error] 33-33: Unexpected any. Specify a different type.
[error] 61-71: This else clause can be omitted because previous branches break early.
[error] 119-119: Unexpected any. Specify a different type.
[error] 25-26: All these imports are only used as types.
http-gateway/web/src/containers/RemoteClients/RemoteClientsPage/RemoteClientsPage.tsx
[error] 96-96: Forbidden non-null assertion.
[error] 151-163: This else clause can be omitted because previous branches break early.
[error] 184-191: This else clause can be omitted because previous branches break early.
[error] 1-1: Some named imports are only used as types.
[error] 5-6: Some named imports are only used as types.
[error] 14-15: All these imports are only used as types.
[error] 16-17: All these imports are only used as types.
http-gateway/web/src/containers/Devices/rest.ts
[error] 86-86: Unexpected any. Specify a different type.
[error] 88-88: Unexpected any. Specify a different type.
[error] 118-118: Unexpected any. Specify a different type.
[error] 120-120: Unexpected any. Specify a different type.
[error] 142-142: Unexpected any. Specify a different type.
[error] 199-199: Unexpected any. Specify a different type.
[error] 8-9: All these imports are only used as types.
http-gateway/web/src/containers/DeviceProvisioning/ProvisioningRecords/DetailPage/Tabs/Tab2/Tab2.tsx
[error] 25-25: Unexpected any. Specify a different type.
[error] 30-30: Unexpected any. Specify a different type.
[error] 31-31: Unexpected any. Specify a different type.
[error] 59-59: Unexpected any. Specify a different type.
[error] 81-81: Unexpected any. Specify a different type.
[error] 138-138: Unexpected any. Specify a different type.
[error] 1-1: Some named imports are only used as types.
[error] 11-12: All these imports are only used as types.
[error] 31-31: Don't use '{}' as a type.
[error] 44-44: This hook does not specify all of its dependencies: _
[error] 46-46: Don't use '{}' as a type.
[error] 53-53: This hook does not specify all of its dependencies: _
[error] 65-65: This hook does not specify all of its dependencies: _
[error] 94-94: This hook does not specify all of its dependencies: _
[error] 94-94: This hook does not specify all of its dependencies: handleViewCert
[error] 94-94: This hook specifies more dependencies than necessary: certData
http-gateway/web/src/containers/DeviceProvisioning/hooks.ts
[error] 15-15: Unexpected any. Specify a different type.
[error] 26-26: Unexpected any. Specify a different type.
[error] 52-52: Unexpected any. Specify a different type.
[error] 74-74: Unexpected any. Specify a different type.
[error] 101-101: Change to an optional chain.
[error] 132-132: Unexpected any. Specify a different type.
[error] 151-151: Do not use template literals if interpolation and special-character handling are not needed.
[error] 158-158: Unexpected any. Specify a different type.
[error] 160-160: Unexpected any. Specify a different type.
[error] 191-191: Change to an optional chain.
[error] 6-7: All these imports are only used as types.
[error] 215-215: This hook does not specify all of its dependencies: formatPSK
http-gateway/web/src/containers/App/AppLayout/AppLayout.tsx
[error] 113-113: Unexpected any. Specify a different type.
[error] 161-161: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.
[error] 170-170: Unexpected any. Specify a different type.
[error] 244-244: The computed expression can be simplified without the use of a string literal.
[error] 244-244: Do not use template literals if interpolation and special-character handling are not needed.
[error] 1-1: Some named imports are only used as types.
[error] 14-15: All these imports are only used as types.
[error] 21-22: All these imports are only used as types.
[error] 23-24: Some named imports are only used as types.
[error] 27-28: All these imports are only used as types.
[error] 33-34: All these imports are only used as types.
[error] 99-99: This hook does not specify all of its dependencies: _
[error] 115-115: This hook does not specify all of its dependencies: dispatch
[error] 115-115: This hook does not specify all of its dependencies: storedRemoteStore.remoteClients.length
[error] 115-115: This hook does not specify all of its dependencies: mockApp
[error] 115-115: This hook does not specify all of its dependencies: storedRemoteStore.remoteClients.map
http-gateway/web/src/containers/Devices/Detail/DevicesDetailsPage/DevicesDetailsPage.tsx
[error] 168-168: Forbidden non-null assertion.
[error] 1-1: Some named imports are only used as types.
[error] 6-7: Some named imports are only used as types.
[error] 14-15: All these imports are only used as types.
[error] 30-31: All these imports are only used as types.
[error] 71-71: This hook does not specify all of its dependencies: isTwinEnabled
[error] 71-71: This hook specifies more dependencies than necessary: loading
[error] 78-78: This hook does not specify all of its dependencies: refresh
[error] 87-87: This hook does not specify all of its dependencies: navigate
[error] 87-87: This hook does not specify all of its dependencies: refreshPendingCommands
[error] 87-87: This hook does not specify all of its dependencies: refreshSoftwareUpdate
http-gateway/web/src/containers/Devices/Detail/DevicesDetailsPage/Tabs/Tab2/Tab2.tsx
[error] 239-239: Unexpected any. Specify a different type.
[error] 1-1: Some named imports are only used as types.
[error] 5-6: Some named imports are only used as types.
[error] 10-14: All these imports are only used as types.
[error] 17-18: All these imports are only used as types.
[error] 19-20: All these imports are only used as types.
Additional comments not posted (20)
http-gateway/web/src/containers/Certificates/rest.ts (1)
11-11
: Corrected function name typo fromgetWellKnow
togetWellKnown
.http-gateway/web/src/containers/PendingCommands/rest.ts (1)
14-14
: AddedunauthorizedCallback
to enhance security handling in API calls.Also applies to: 20-20, 27-27
http-gateway/web/src/containers/Certificates/hooks.ts (1)
14-14
: AddedunauthorizedCallback
to enhance security handling in hook calls.Also applies to: 20-20, 25-25, 31-31
http-gateway/web/src/containers/PendingCommands/hooks.ts (1)
15-15
: AddedunauthorizedCallback
to enhance security handling in hook calls.Also applies to: 22-22
http-gateway/web/src/containers/App/AppInner/AppInner.tsx (1)
30-36
: Added and utilizedunauthorizedCallback
to enhance security handling in the application context.Also applies to: 46-48, 65-69
http-gateway/web/src/containers/DeviceProvisioning/LinkedHubs/DetailHeader/DetailHeader.tsx (1)
72-72
: Simplified thedeleteInformation
array in theDeleteModal
component to streamline the deletion information presented to the user.http-gateway/web/src/containers/Devices/List/ProvisionNewDevice/ProvisionNewDevice.tsx (1)
62-62
: Correct usage ofgetWellKnownConfig
function.This change correctly updates the function call to use the proper function name, ensuring the correct configuration is retrieved.
http-gateway/web/src/containers/DeviceProvisioning/EnrollmentGroups/NewEnrollmentGroupsPage/NewEnrollmentGroupsPage.tsx (1)
55-55
: Correct usage ofgetWellKnownConfig
function.This change correctly updates the function call to use the proper function name, ensuring the correct configuration is retrieved.
http-gateway/web/src/containers/DeviceProvisioning/ProvisioningRecords/DetailPage/Tabs/Tab3/Tab3.tsx (1)
24-24
: Correct usage ofgetWellKnownConfig
function.This change correctly updates the function call to use the proper function name, ensuring the correct configuration is retrieved.
http-gateway/web/src/containers/DeviceProvisioning/rest.ts (1)
14-14
: Addition ofunauthorizedCallback
to API calls.This change enhances security by ensuring that unauthorized access is handled consistently across all API calls.
Also applies to: 24-24, 48-48, 56-56, 66-66, 76-76, 88-88, 98-98, 108-108, 115-115, 123-123, 130-130, 138-138, 145-145, 153-153, 160-160
http-gateway/web/src/containers/Devices/hooks.ts (1)
17-17
: Addition ofunauthorizedCallback
to hooks.This change enhances security by ensuring that unauthorized access is handled consistently across all hooks.
Also applies to: 22-22, 38-38, 43-43, 70-70, 75-75, 80-80, 83-83, 119-119, 123-123, 128-128, 133-133, 138-138, 146-146
http-gateway/web/src/containers/App/App.tsx (1)
67-67
: Correct usage ofsetWellKnownConfig
function.This change correctly updates the function call to use the proper function name, ensuring the correct configuration is set.
http-gateway/web/src/containers/RemoteClients/RemoteClientsPage/RemoteClientsPage.tsx (2)
29-29
: Corrected function name togetWellKnownConfig
.This change corrects the typo in the function name, ensuring the correct function is called.
152-152
: AddedunauthorizedCallback
to thesetWellKnownConfig
call.This addition enhances security by handling unauthorized access scenarios more robustly.
http-gateway/web/src/containers/Devices/rest.ts (1)
17-17
: AddedunauthorizedCallback
to API calls.This addition is consistent across multiple API functions, enhancing security by handling unauthorized scenarios uniformly.
Also applies to: 34-34, 59-59, 91-91, 123-123, 144-144, 165-165
http-gateway/web/src/containers/DeviceProvisioning/ProvisioningRecords/DetailPage/Tabs/Tab2/Tab2.tsx (1)
40-40
: Corrected function name togetWellKnownConfig
.This change corrects the typo in the function name, ensuring the correct function is called.
http-gateway/web/src/containers/DeviceProvisioning/hooks.ts (1)
12-12
: AddedunauthorizedCallback
to various hooks.This addition enhances security by handling unauthorized scenarios uniformly across multiple hooks.
Also applies to: 23-23, 36-36, 46-46, 71-71, 85-85, 98-98, 110-110, 129-129, 142-142, 152-152, 175-175, 188-188, 200-200, 234-234, 240-240, 245-245, 254-254
http-gateway/web/src/containers/App/AppLayout/AppLayout.tsx (1)
50-50
: Corrected function name togetWellKnownConfig
.This change corrects the typo in the function name, ensuring the correct function is called.
http-gateway/web/src/containers/Devices/Detail/DevicesDetailsPage/DevicesDetailsPage.tsx (1)
60-60
: Correct the typo in the function call to enhance code accuracy.This change corrects the previously incorrect function call from
getWellKnowConfig
togetWellKnownConfig
, aligning with the correct function name and ensuring the proper functionality is invoked.http-gateway/web/src/containers/Devices/Detail/DevicesDetailsPage/Tabs/Tab2/Tab2.tsx (1)
58-58
: Corrected typo in function call togetWellKnownConfig
.This change ensures the correct function is invoked, aligning with the PR's objectives to fix recurring typos.
@@ -21,7 +21,7 @@ const Tab3: FC<Props> = (props) => { | |||
const { formatMessage: _ } = useIntl() | |||
const [displayData, setDisplayData] = useState<any>(undefined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify explicit types instead of using any
.
- const Tab3: FC<Props> = (props) => {
+ const Tab3: FC<PropsType> = (props) => {
- const getSubject = (item: any) => {
+ const getSubject = (item: SubjectType) => {
- const columns = useMemo(
+ const columns: ColumnType[] = useMemo(
Using explicit types instead of any
improves type safety and code maintainability.
Also applies to: 29-29, 51-51
Tools
Biome
[error] 22-22: Unexpected any. Specify a different type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- pkg/security/openid/config.go (1 hunks)
- test/oauth-server/service/getOpenIDConfiguration.go (1 hunks)
- test/oauth-server/service/logOut.go (1 hunks)
- test/oauth-server/uri/uri.go (1 hunks)
Files skipped from review due to trivial changes (2)
- pkg/security/openid/config.go
- test/oauth-server/uri/uri.go
Additional comments not posted (5)
test/oauth-server/service/logOut.go (4)
10-18
: Handling of POST requests with form parsing and error management looks correct.
19-19
: Proper handling of GET requests by retrieving the redirect URI from query parameters.
20-23
: Correct implementation of default case by setting the 'Allow' header and returning a 405 status for unsupported methods.
24-28
: Redirection logic correctly implemented to handle valid and empty redirect URIs.test/oauth-server/service/getOpenIDConfiguration.go (1)
13-18
: The OpenID configuration object is correctly constructed with all necessary URLs, including the newly addedEndSessionEndpoint
.
Quality Gate passedIssues Measures |
This PR introduces a mechanism to handle HTTP 401 (Unauthorized) errors by automatically logging out the user. When a 401 error is encountered during any request, the system will now log out the user and redirect them to the login page, ensuring that they are aware of the need to reauthenticate.