Project

General

Profile

Actions

Feature #12817

closed
DM RM

Support organisation specific authorization endpoint

Feature #12817: Support organisation specific authorization endpoint

Added by Dries Mys about 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
07/04/2024
Due date:
% Done:

100%

Estimated time:

Description

Some OAuth platforms use organization specific authorization endpoints, f.ex. the Microsoft identity platform:

Microsoft uses the following format for the authorization endpoint: https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize

For tenant, often the value common can be used, but this is not always the case (f.ex. when you want to limit the login to a specific organisation).

To support this situation, it would be useful to add a virtual OAuthProcess::authorizationEndpoint function and use this virtual function when constructing the authorize url inside OAuthProcess::authorizeUrl. The default implementation of this new virtual function would be:

std::string OAuthProcess::authorizationEndpoint () {return service_.authorizationEndpoint();}

By inheriting OAuthProcess (and OAuthService), one could implement the different authorization endpoints, f.ex. based on the organization for which the user is trying to sign in.

Currently, the only possibility (if you want to use the Wt::Auth framework) is to create a separate OAuthService for each tenant, but this require also separate redirect urls. This is somewhat cumbersome as all of them need to be registered in the Microsoft identity platform.

MV Updated by Matthias Van Ceulebroeck about 2 years ago Actions #1

  • Target version set to 4.11.1

Hey Dries,

Ah, that is indeed very true. Perhaps, in the same vein, it would also be interesting to allow each process to override its scope.
Just a potential other case that may be desired for more complex user-management systems.

MV Updated by Matthias Van Ceulebroeck about 2 years ago Actions #2

  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn about 2 years ago Actions #3

  • Status changed from New to InProgress

RM Updated by Romain Mardulyn about 2 years ago Actions #4

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)

MV Updated by Matthias Van Ceulebroeck about 2 years ago Actions #5

  • Assignee set to Matthias Van Ceulebroeck

MV Updated by Matthias Van Ceulebroeck almost 2 years ago Actions #6

  • Target version changed from 4.11.1 to 4.12.0

MV Updated by Matthias Van Ceulebroeck over 1 year ago Actions #7

  • Status changed from Review to Implemented @Emweb
  • Assignee changed from Matthias Van Ceulebroeck to Romain Mardulyn
  • % Done changed from 0 to 100

MV Updated by Matthias Van Ceulebroeck over 1 year ago Actions #8

  • Status changed from Implemented @Emweb to Implemented @Test

MV Updated by Matthias Van Ceulebroeck about 1 year ago Actions #9

  • Status changed from Implemented @Test to Closed
Actions

Also available in: PDF Atom