{"componentChunkName":"component---src-templates-page-jsx","path":"/api/oauth2-legacy/","result":{"data":{"site":{"siteMetadata":{"title":"developer.tt.se","description":"TT News Agency developer documentation and useful stuff."}},"markdownRemark":{"frontmatter":{"title":"OAuth2 (Legacy)"},"html":"<blockquote>\n<p><strong>This page documents the legacy TT OAuth2 system.</strong> It has been replaced by a Keycloak-based\nimplementation. See the <a href=\"/api/oauth2/\">current authentication documentation</a> for the new system.</p>\n</blockquote>\n<p>The Media and Content APIs support OAuth2 bearer authentication.\nYou can obtain a <code>client_id</code> and <code>client_secret</code> <a href=\"https://tt.se/konto/developer\">here</a>, which you can use to issue access tokens, either using the\nregular Authorization Code Grant (for web apps), Implicit Grant (for\nsingle-page web apps) or Password Grant (server-side apps).</p>\n<h2 id=\"endpoints\" style=\"position:relative;\"><a href=\"#endpoints\" aria-label=\"endpoints permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Endpoints</h2>\n<p>We support the following endpoints:</p>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>URL</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>authorization endpoint</td>\n<td><code>https://tt.se/o/oauth2/auth</code></td>\n</tr>\n<tr>\n<td>token endpoint</td>\n<td><code>https://tt.se/o/oauth2/token</code></td>\n</tr>\n<tr>\n<td>user endpoint</td>\n<td><code>https://tt.se/o/v2/user</code></td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"scopes\" style=\"position:relative;\"><a href=\"#scopes\" aria-label=\"scopes permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Scopes</h2>\n<p>We define the following scopes, which determine which user information fields\nare exposed to the holder of the <code>access_token</code>. For API access to work, the\ntoken need to be issued with at least <code>roles</code> scope.</p>\n<table>\n<thead>\n<tr>\n<th>Scope</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>Include <code>email</code>, the user email address.</td>\n</tr>\n<tr>\n<td>roles</td>\n<td>Include <code>roles</code>, an array of role names assumed by the user.</td>\n</tr>\n<tr>\n<td>user</td>\n<td>Include the user-specific fields <code>name</code>, <code>family_name</code> and <code>given_name</code> and <code>user_id</code> (if available)</td>\n</tr>\n<tr>\n<td>customer</td>\n<td>Include the customer-specific fields <code>customer_id</code>, <code>customer_name</code> and <code>department</code> (if available)</td>\n</tr>\n<tr>\n<td>profile</td>\n<td>Allow access to view and update user profile.</td>\n</tr>\n<tr>\n<td>collection</td>\n<td>Allow access to view and update user collections.</td>\n</tr>\n<tr>\n<td>admin</td>\n<td>Allow access to the organization user admin endpoints, provided the user has user admin privileges.</td>\n</tr>\n</tbody>\n</table>\n<p>Do note that the while <code>profile</code> and <code>collection</code> scopes are\nimplemented in the OAuth2 service, there are currently no APIs that\nuse them. There are plans to change the endpoints\n<code>api.tt.se/content/v1/profile</code> and <code>api.tt.se/content/v1/collection</code>\nto require these scopes in the future.</p>\n<h3 id=\"roles\" style=\"position:relative;\"><a href=\"#roles\" aria-label=\"roles permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Roles</h3>\n<p>We define the following well-known user roles.</p>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ROLE_TT</td>\n<td>User is a TT employee.</td>\n</tr>\n<tr>\n<td>ROLE_OFP</td>\n<td>User is a TT customer.</td>\n</tr>\n<tr>\n<td>ROLE_MEDIEBANK</td>\n<td>User has access to the Mediabank.</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"client-id-and-secrets\" style=\"position:relative;\"><a href=\"#client-id-and-secrets\" aria-label=\"client id and secrets permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Client ID and secrets</h2>\n<p>The Client ID is a non-secret string that identifies an app or integration. It\nis paired with a Client Secret, both of which are necessary for issuing\n<code>access_token</code>s.</p>\n<p><a href=\"https://tt.se/konto/developer\">Manage your Client ID/Secret here.</a></p>\n<h2 id=\"issuing-access_tokens\" style=\"position:relative;\"><a href=\"#issuing-access_tokens\" aria-label=\"issuing access_tokens permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Issuing access_tokens</h2>\n<p>OAuth2 offers several ways for clients to obtain an <code>access_token</code>. Developers\nwriting integrations running as a single user will probably use <a href=\"https://www.oauth.com/oauth2-servers/access-tokens/password-grant/\">Password\nGrant</a>.</p>\n<p>A sample call using <a href=\"https://curl.haxx.se/\">curl</a> looks like this:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">curl</span> <span class=\"token parameter variable\">-XPOST</span> <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">username</span><span class=\"token operator\">=</span><span class=\"token operator\">&lt;</span>username<span class=\"token operator\">></span> <span class=\"token punctuation\">\\</span>\n  <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">password</span><span class=\"token operator\">=</span><span class=\"token operator\">&lt;</span>password<span class=\"token operator\">></span> <span class=\"token punctuation\">\\</span>\n  <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">client_id</span><span class=\"token operator\">=</span><span class=\"token operator\">&lt;</span>client_id<span class=\"token operator\">></span> <span class=\"token punctuation\">\\</span>\n  <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">client_secret</span><span class=\"token operator\">=</span><span class=\"token operator\">&lt;</span>client_id<span class=\"token operator\">></span> <span class=\"token punctuation\">\\</span>\n  <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">grant_type</span><span class=\"token operator\">=</span>password <span class=\"token punctuation\">\\</span>\n  <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">scope</span><span class=\"token operator\">=</span><span class=\"token string\">\"roles\"</span>\n  https://tt.se/o/oauth2/token</code></pre></div>\n<ul>\n<li><code>username</code> and <code>password</code> should be the regular TT login credentials.</li>\n<li><code>client_id</code> is the (non-secret) client ID issued by TT.</li>\n<li><code>client_secret</code> is the client secret issued by TT.</li>\n<li><code>scope</code> is a space-separated list of scope names (see above). It needs to\ninclude <code>roles</code> for API access to work; the other scopes are optional.</li>\n</ul>\n<p>You will get a JSON result like this:</p>\n<div class=\"gatsby-highlight\" data-language=\"json\"><pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n  <span class=\"token property\">\"access_token\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"a.n2Oc_XqcuBqe5RjLtiEnasIoRyB62As6JxsmwVHAaxq7DMLqRm43Qe0qzPgh37nvJfaP8x1EWA6GNTRG0ibsj0ZlMGHo7ev27zLb_lNQEnk\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"refresh_token\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"r.4LyAp206TaQzeQTee1LvHyLmWSVvXeTM8IIIY__5BF9dLkpEXqbTMg\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"expires_in\"</span><span class=\"token operator\">:</span> <span class=\"token number\">2592000</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"id_token\"</span><span class=\"token operator\">:</span> \"eyJhbGciOiJFUzM4NCIsInR5cCI6IkpXVCIsImtpZCI6IjdDZjVqR2JuS2dLdUFYZElSeXpJdnRfaGYtOVZ1YmYyVzlBbHBUMzg1eWciLCJqa3UiOiJodHRwczovL3R0LnNlL28vb2F1dGgyL2NlcnRzIn0.eyJzdWI\niOiJmcmVkcmlrLmFwcGVsYmVyZyIsInNjb3BlIjoicm9sZXMiLCJyb2xlcyI6WyJST0xFX09GUF9BRE1JTiIsIlJPTEVfREVXQVJfU0VORCZVU0VSIiwiUk9MRV9ERVdBUl9VU0VSIiwiUk9MRV9JVERSSUZUIiwiUk9MRV9JVFVUViIsI\nlJPTEVfU0dCIiwiUk9MRV9TQ0FOUElYIiwiUk9MRV9UVCIsIlJPTEVfQ09ORkxVRU5DRSIsIlJPTEVfREFTSEJPQVJEX0FETUlOIl0sImlhdCI6MTU2MjMxNjEwNSwibmJmIjoxNTYyMzE2MTA0LCJleHAiOjE1NjI5MjA5MDUsImF1ZCI\n6WyJhb0pydXN2dF9QenZlNFhoazNwWFM5YzhwUDlOaUNrdmpIVnJ5eUphQWtBIl0sImlzcyI6Imh0dHBzOi8vdHQuc2UifQ.gKn90_M015Ue51GLisbf3Ezrij3PzcXZTTvnACVGn4FNO4NGlnjVKJgtVKFADIzgLiX-6EgOaJbQDrwrknapQptQUponAYrX39_Q1BCwF7OxQd0MCaevZesWj9dB3uSx\"<span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"token_type\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Bearer\"</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n<ul>\n<li><code>access_token</code> is your access token. It should be passed al in the\n<code>Authorization</code> header when making API calls.</li>\n<li><code>refresh_token</code> can be used to generate new tokens after they expire.</li>\n<li><code>id_token</code> is a <a href=\"https://jwt.io\">JWT</a> object representing your user.</li>\n</ul>\n<p>When exploring the API and using the examples in the <a href=\"/api/content-api\">Content API</a>\nsection it is conventient to export the token as an environment variable:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token builtin class-name\">export</span> <span class=\"token assign-left variable\">TOKEN</span><span class=\"token operator\">=</span>a.n2Oc_XqcuBqe5RjLtiEnasIoRyB62As6JxsmwVHAaxq7DMLqRm43Qe0qzPgh37nvJfaP8x1EWA6GNTRG0ibsj0ZlMGHo7ev27zLb_lNQEnk</code></pre></div>\n<h2 id=\"refreshing-access_tokens\" style=\"position:relative;\"><a href=\"#refreshing-access_tokens\" aria-label=\"refreshing access_tokens permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Refreshing access_tokens</h2>\n<p>The <code>access_token</code> is valid for 7 days. When it expires you can use the\n<code>refresh_token</code> to generate a new set of tokens without having to supply\n<code>username</code> and <code>password</code>:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">curl</span> <span class=\"token parameter variable\">-XPOST</span> <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">client_id</span><span class=\"token operator\">=</span><span class=\"token operator\">&lt;</span>client_id<span class=\"token operator\">></span> <span class=\"token punctuation\">\\</span>\n  <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">client_secret</span><span class=\"token operator\">=</span><span class=\"token operator\">&lt;</span>client_secret<span class=\"token operator\">></span> <span class=\"token punctuation\">\\</span>\n  <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">grant_type</span><span class=\"token operator\">=</span>refresh_token <span class=\"token punctuation\">\\</span>\n  <span class=\"token parameter variable\">-d</span> <span class=\"token assign-left variable\">refresh_token</span><span class=\"token operator\">=</span><span class=\"token operator\">&lt;</span>refresh_token<span class=\"token operator\">></span> <span class=\"token punctuation\">\\</span>\n  https://tt.se/o/oauth2/token</code></pre></div>\n<p>Refreshing will invalidate the original <code>access_token</code> if it wasn't already\nexpired.</p>\n<h2 id=\"making-authenticated-requests\" style=\"position:relative;\"><a href=\"#making-authenticated-requests\" aria-label=\"making authenticated requests permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Making authenticated requests</h2>\n<p>Once an <code>access_token</code> has been obtained, it can be used to make authenticated\nrequests to the <a href=\"/api/media-api\">Media API</a> and <a href=\"/api/content-api\">Content API</a> by passing it\nin the HTTP <code>Authorization</code> header.</p>\n<div class=\"gatsby-highlight\" data-language=\"http\"><pre class=\"language-http\"><code class=\"language-http\"><span class=\"token request-line\"><span class=\"token method property\">GET</span> <span class=\"token request-target url\">/content/v1/text/search</span> <span class=\"token http-version property\">HTTP/1.1</span></span>\n<span class=\"token header\"><span class=\"token header-name keyword\">Host</span><span class=\"token punctuation\">:</span> <span class=\"token header-value\">api.tt.se</span></span>\n<span class=\"token header\"><span class=\"token header-name keyword\">Authorization</span><span class=\"token punctuation\">:</span> <span class=\"token header-value\">Bearer a.n2Oc_XqcuBqe5RjLtiEnasIoRyB62As6JxsmwVHAaxq7DMLqRm43Qe0qzPgh37nvJfaP8x1EWA6GNTRG0ibsj0ZlMGHo7ev27zLb_lNQEnk</span></span></code></pre></div>\n<h2 id=\"verifying-access_tokens\" style=\"position:relative;\"><a href=\"#verifying-access_tokens\" aria-label=\"verifying access_tokens permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Verifying access_tokens</h2>\n<p><code>access_token</code>s can be verified by calling the user endpoint (see\n<a href=\"#endpoints\">Endpoints</a> above) with an Authorization header:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">curl</span> <span class=\"token parameter variable\">-H</span> <span class=\"token string\">\"Authorization: Bearer <span class=\"token variable\">$TOKEN</span>\"</span> https://tt.se/o/v2/user</code></pre></div>\n<p>If the token is valid, the call will return HTTP 200 and a JSON structure\ncontaining the fields defined by the <a href=\"#scopes\">scopes</a> used to issue the token.</p>\n<div class=\"gatsby-highlight\" data-language=\"json\"><pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>                                                                                                                       <span class=\"token property\">\"sub\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"username\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"scope\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"roles profile email\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"roles\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n    <span class=\"token string\">\"ROLE_OFP\"</span><span class=\"token punctuation\">,</span>\n    ...\n  <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Firstname Lastname\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"family_name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Lastname\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"given_name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Firstname\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"email\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"user@domain.com\"</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n<p>If the token is invalid or has expired, tthe call will instead return HTTP 401\n(Unauthorized).</p>\n<h2 id=\"openid-connect\" style=\"position:relative;\"><a href=\"#openid-connect\" aria-label=\"openid connect permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>OpenID Connect</h2>\n<p>We support <a href=\"https://openid.net/connect/\">OpenID Connect</a>. The configuration can be found\n<a href=\"https://tt.se/.well-known/openid-configuration\">here</a>.</p>","headings":[{"value":"Endpoints","depth":2},{"value":"Scopes","depth":2},{"value":"Roles","depth":3},{"value":"Client ID and secrets","depth":2},{"value":"Issuing access_tokens","depth":2},{"value":"Refreshing access_tokens","depth":2},{"value":"Making authenticated requests","depth":2},{"value":"Verifying access_tokens","depth":2},{"value":"OpenID Connect","depth":2}]}},"pageContext":{"slug":"/api/oauth2-legacy/"}},"staticQueryHashes":["3096394494"]}