OAuth2 | Server Endpoints

By default, the OAuth2 Server uses the following Endpoints:

Authorization: /sgc/oauth2/auth

Token: /sgc/oauth2/token

Revocation: /sgc/oauth2/revoke (POST) - Revokes tokens per RFC 7009

Introspection: /sgc/oauth2/introspect (POST) - Returns token metadata per RFC 7662

Device Authorization: /sgc/oauth2/device (POST) - Issues device codes per RFC 8628

Device Verification: /sgc/oauth2/device/verify (GET/POST) - User verification page

Which means that if your server listens on IP 80.54.41.30 and port 8443, the full OAuth2 Endpoints will be:

Authorization: https://80.54.41.30:8443/sgc/oauth2/auth

Token: https://80.54.41.30:8443/sgc/oauth2/token

Revocation: https://80.54.41.30:8443/sgc/oauth2/revoke

Introspection: https://80.54.41.30:8443/sgc/oauth2/introspect

Device Authorization: https://80.54.41.30:8443/sgc/oauth2/device

Device Verification: https://80.54.41.30:8443/sgc/oauth2/device/verify

This Endpoints can be modified easily, just access to OAuth2Options property of component and modify Authorization and Token URLs.

Example: if your endpoints must be

Authorization: https://80.54.41.30:8443/authentication/auth

Token: https://80.54.41.30:8443/authentication/token

Set the OAuth2Options property with the following values:

OAuth2Options.Authorization.URL = /authentication/auth

OAuth2Options.Token.URL = /authentication/token

The same approach applies to the other endpoints:

OAuth2Options.Revocation.URL = /authentication/revoke

OAuth2Options.Introspection.URL = /authentication/introspect

OAuth2Options.DeviceAuthorization.URL = /authentication/device

OAuth2Options.DeviceAuthorization.VerificationURL = /authentication/device/verify