Skip to content

OAuthFlowBuilder.addScope raises std::out_of_range exception #101

@xvThomas

Description

@xvThomas

I am trying to configure swagger security scheme like this:

flow_builder
  .setAuthorizationUrl("http://localhost:8090/realms/my-realm/protocol/openid-connect/auth")
  .setTokenUrl("http://localhost:8090/realms/my-realm/protocol/openid-connect/token")
  .addScope("openid", "");

In Model.hpp, the m_scopes member initialized by the private getScopes() method returns an empty unordered_map. So, when addScope(“openid”, “ ”) is executed, the underlying code line getScopes()->at(name) = scope raises an exception.

libc++abi: terminating due to uncaught exception of type std::out_of_range: unordered_map::at: key not found

getScopes()->at(name) = scope should be replaced by m_scopes->operator[](name) = scope for example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions