liveBook · Manning

Authorization endpoint

As explained in Software Security for Developers

An authorization endpoint is an identity provider endpoint where a client initiates user authorization and authentication.

An authorization endpoint is an identity provider endpoint where a client starts user authentication and authorization. The client redirects the user there with parameters such as response_type, client_id, redirect_uri, and scope. section 12.3

{
  "issuer": "http://localhost:9000",
  "authorization_endpoint": "http://localhost:9000/oauth2/authorize",  #1
  "device_authorization_endpoint": 
  "http://localhost:9000/oauth2/device_authorization",
  "token_endpoint": "http://localhost:9000/oauth2/token",  #2

…

}

OIDC discovery identifies the authorization endpoint alongside the token endpoint, allowing the client to obtain the correct URL before starting the flow. section 12.3

Starting authorization-code flow

A client can redirect the user to http://localhost:9000/oauth2/authorize?response_type=code&client_id=oidc-client&redirect_uri=http://127.0.0.1:8080/login/oauth2/code&scope=openid. After successful authentication, the identity provider redirects to the specified URI with a temporary authorization code. section 12.3

The request tells the identity provider:

  • Which grant response the client expects: code. section 12.3
  • Which client is requesting authentication and where to redirect afterward. section 12.3
  • Which scope the client requests, such as openid. section 12.3

How Software Security for Developers covers it

How deep it goes
Explains discovery, request parameters, user redirection, and returned codes, while deferring code exchange to the token endpoint.
Examples
Uses a localhost authorization URL, an OIDC configuration response, and a redirect carrying an authorization code.
What it assumes
Assumes a configured client, identity provider, redirect URI, and requested scope.
What you can do after
Apply it via OIDC discovery to construct an authorization request and receive a code for subsequent token acquisition.
How it connects
Connects OIDC discovery, OAuth2 authorization-code flow, client identity, redirect URI, scope, and the token endpoint.

Also explained in

Compare how 3 books explain authorization endpoint →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.