Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

feat(logout): new logout implementation using /logout/v2 API #3513

Merged
merged 2 commits into from Feb 1, 2019

Conversation

rohitkrai03
Copy link
Collaborator

Fixes openshiftio/openshift.io#4742

  • Implements new logout using /logout/v2 endpoint.
  • Instead of redirecting to the logout endpoint, now we make http request to logout/v2 with redirect param. the response then sends a redirect_location and we redirect to that url.
  • Renamed jsonapi.client to http.client and added simple fetch method for axios get.
  • Added tests for logout action in react app and login service in angular.

@@ -13,6 +14,10 @@ export class JsonApiError extends Error implements IJsonApiError {
}
}

export async function fetch(url: string): Promise<MetaObject> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to fetch<T>(url: string): Promise<T> to force clients of this API to provide a proper type.

return function(dispatch) {
return async function(dispatch) {
const logoutUrl = getLogoutUrl(window.location.origin);
const result: { [key: string]: any } = await fetch(logoutUrl);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a proper interface for the expected response instead of a key / value pair of strings.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/343/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/343/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/343

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/341/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/341/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/341

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@christianvogt christianvogt merged commit c871524 into fabric8-ui:master Feb 1, 2019
@fabric8cd
Copy link
Contributor

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

karthikjeeyar pushed a commit to karthikjeeyar/fabric8-ui that referenced this pull request Feb 6, 2019
…-ui#3513)

* feat(logout): new logout implementation using /logout/v2 API

* fix(types): add better type checking for fetch
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants