Skip to content

logout button under authorize popup is not clearing cookies session #7203

Open
@arunsethu88

Description

@arunsethu88

Q&A (please complete the following information)

Content & configuration

Swagger Configuration Java Code:

    @Bean
	    public OpenAPI customOpenAPI() {
	    	final String securitySchemeName = "Basic Auth";

	    	return new OpenAPI()
	    			.addSecurityItem(new SecurityRequirement().addList(securitySchemeName))
	    			.components(
	    					new Components()
	    					.addSecuritySchemes(securitySchemeName,
	    							new SecurityScheme()
	    							.name(securitySchemeName)
	    							.type(SecurityScheme.Type.HTTP)
	    							.scheme("Basic")
	    							.in(SecurityScheme.In.HEADER)
	    							)
	    					)
	    			.info(new Info()
	    					.title(name)
	    					.description(description)
	    					.termsOfService("")
	    					.version(version)
	    					.license(new License()
	    							.name("Apache 2.0")
	    							.url("http://www.apache.org/licenses/LICENSE-2.0.html"))
	    					.contact(new io.swagger.v3.oas.models.info.Contact()
	    							.email("[email protected]")));
	    }

Maven :

<dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-oas</artifactId>
            <version>3.0.0</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>3.0.0</version>
        </dependency> 

Describe the bug you're encountering

Logout button doesn't clear browser cookies session

To reproduce...

Steps to reproduce the behavior:

  1. Open Swagger Docs page.
  2. Click on "Authorize" button.
  3. Enter Username and password for basic auth.
  4. Click "Authorize"
  5. Getting proper expected output for given authentication credentials.
  6. To logout, it should clear browser session cookies.
  7. But it is not clearing browser cookies after click logout.
  8. Because of not clearing browser cookies, it is using old credentials for all REST API call.

Expected behavior

When I click logout, it should clear session in browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions