Files
authentik/website/docs/developer-docs/api/reference/sources-user-connections-oauth-create.api.mdx
Tana M Berry 7a6d44d0df first pass
2024-10-22 15:10:13 -05:00

592 lines
26 KiB
Plaintext

---
id: sources-user-connections-oauth-create
title: "sources_user_connections_oauth_create"
description: "Source Viewset"
sidebar_label: "sources_user_connections_oauth_create"
hide_title: true
hide_table_of_contents: true
api: eJzFWFtv2zYY/SuEMGAPc6w0bYEtT8u6rDPQNEGSFti6TKAl2mZNkRpJ1XEN//edj5Rs+RInATrspaVCfrfD813oRWIqYbmXRg+K5DRxpra5cFnthM1yo7XIac9lhtd+kuVWcC+SXlIIl1tZ0R6kboIU+yjFzAmPbc/HLjn91KpL7nqJFf/UwvlfTDFPThcJdHuhPS15VSmZBx/Sz44ULhKXT0TJaeXnlYAJM/wMV3YsX57BLdbYvxFWciW/CotzlaXIvIR1aJEFjMmRxNZap/NW6jHOllK/E3rsJ8npC3zx+/br5PXrZS/hOWJwmTdTofeJz6z04lIrBOZtLXqJrpXiQyXi93IZo5dWFARKxxfg4qWng8kHIB6iicG8WWF/HYFLlpt6guZe4kRewzxMfwKSECfdU3zdLQPorsLtRQxOjl/8D8hX044uCdPjcAhEKrqQtTAMfk0QFdHvCWIUf3AgBKPU5SjAcNjxZ7q8uuWRsSUHbEldy+JABFfDkoUj8E7zUuzTtc+j7x0rpKsUn7P3EOuTvFP1+HH5AeCxmisWwWBktceAYcGkZh+u37l+skHr18cImXuSgvjfn4740dezoz+Pj37K7n74jgwLTfwtOraHxijBNW22NIvMyUbKzJ4C2GZWbAfxG7Qwb8htNoN61rWix0zcSxcWxA3Xj05ao1SJQ/+VD9ECWdVi1rEcymNDmnlWIo9wxnUc4NbyOeyhMJTucccotcfW1NW3VpqbEgWgSffDLHorPIspw1ZSYBTzE+7ZTLCpBjiTCJAopMeGYKsc20nML8IOjRPZ01LgWvja6kYdMmFD+hHtWaVqy9XzjUS5R22VwvOsNIVQzwtGtmkZZNlD6iuDGjzPkJpSi2CHLAhdl9QsUN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ddlrJc5AksofPHvXyYqryxu6n2Hzm0oc8hLLZ1Tl8S+yCDFVMTocCH9bJAotvUavwn7UuWwedd3nXmR6r1103tU8DISth4AnnLglYgOiXhNKJPryDsr/BQcNcI4=
sidebar_class_name: "post api-method"
info_path: docs/developer-docs/api/reference/authentik
custom_edit_url: null
hide_send_button: true
---
import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
<Heading
as={"h1"}
className={"openapi__heading"}
children={"sources_user_connections_oauth_create"}
>
</Heading>
<MethodEndpoint
method={"post"}
path={"/sources/user_connections/oauth/"}
>
</MethodEndpoint>
Source Viewset
<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>
<MimeTabs
className={"openapi-tabs__mime"}
>
<TabItem
label={"application/json"}
value={"application/json-schema"}
>
<details
style={{}}
className={"openapi-markdown__details mime"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-mime"}
>
<h3
className={"openapi-markdown__details-summary-header-body"}
>
Body
</h3><strong
className={"openapi-schema__required"}
>
required
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"identifier"}
required={true}
schemaName={"string"}
qualifierMessage={"**Possible values:** `non-empty` and `<= 255 characters`"}
schema={{"type":"string","minLength":1,"maxLength":255}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"access_token"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","writeOnly":true,"nullable":true}}
>
</SchemaItem>
</ul>
</details>
</TabItem>
</MimeTabs><div>
<div>
<ApiTabs
label={undefined}
id={undefined}
>
<TabItem
label={"201"}
value={"201"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"pk"}
required={true}
schemaName={"ID (integer)"}
qualifierMessage={undefined}
schema={{"type":"integer","readOnly":true,"title":"ID"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"user"}
required={true}
schemaName={"integer"}
qualifierMessage={undefined}
schema={{"type":"integer","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
source
</strong><span
className={"openapi-schema__name"}
>
object
</span><span
className={"openapi-schema__divider"}
>
</span><span
className={"openapi-schema__required"}
>
required
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
Source Serializer
</div><SchemaItem
collapsible={false}
name={"pk"}
required={true}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","readOnly":true,"title":"Pbm uuid"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Source's display Name."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"slug"}
required={true}
schemaName={"string"}
qualifierMessage={"**Possible values:** `<= 50 characters`, Value must match regular expression `^[-a-zA-Z0-9_]+$`"}
schema={{"type":"string","description":"Internal source name, used in URLs.","maxLength":50,"pattern":"^[-a-zA-Z0-9_]+$"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"enabled"}
required={false}
schemaName={"boolean"}
qualifierMessage={undefined}
schema={{"type":"boolean"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"authentication_flow"}
required={false}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","nullable":true,"description":"Flow to use when authenticating existing users."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"enrollment_flow"}
required={false}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","nullable":true,"description":"Flow to use when enrolling new users."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"user_property_mappings"}
required={false}
schemaName={"uuid[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string","format":"uuid"}}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"group_property_mappings"}
required={false}
schemaName={"uuid[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string","format":"uuid"}}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"component"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Get object component so that we know how to edit the object","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"verbose_name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Return object's verbose_name","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"verbose_name_plural"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Return object's plural verbose_name","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"meta_model_name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Return internal model name","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"policy_engine_mode"}
required={false}
schemaName={"PolicyEngineMode (string)"}
qualifierMessage={"**Possible values:** [`all`, `any`]"}
schema={{"enum":["all","any"],"type":"string","title":"PolicyEngineMode"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"user_matching_mode"}
required={false}
schemaName={"UserMatchingModeEnum (string)"}
qualifierMessage={"**Possible values:** [`identifier`, `email_link`, `email_deny`, `username_link`, `username_deny`]"}
schema={{"description":"How the source determines if an existing user should be authenticated or a new user enrolled.","enum":["identifier","email_link","email_deny","username_link","username_deny"],"type":"string","title":"UserMatchingModeEnum"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"managed"}
required={true}
schemaName={"Managed by authentik (string)"}
qualifierMessage={undefined}
schema={{"type":"string","nullable":true,"title":"Managed by authentik","description":"Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"user_path_template"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"icon"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","nullable":true,"description":"Get the URL to the Icon. If the name is /static or\nstarts with http it is returned as-is","readOnly":true}}
>
</SchemaItem>
</div>
</details>
</SchemaItem><SchemaItem
collapsible={false}
name={"created"}
required={true}
schemaName={"date-time"}
qualifierMessage={undefined}
schema={{"type":"string","format":"date-time","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"identifier"}
required={true}
schemaName={"string"}
qualifierMessage={"**Possible values:** `<= 255 characters`"}
schema={{"type":"string","maxLength":255}}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"pk\": 0,\n \"user\": 0,\n \"source\": {\n \"pk\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"name\": \"string\",\n \"slug\": \"string\",\n \"enabled\": true,\n \"authentication_flow\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"enrollment_flow\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"user_property_mappings\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"group_property_mappings\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"component\": \"string\",\n \"verbose_name\": \"string\",\n \"verbose_name_plural\": \"string\",\n \"meta_model_name\": \"string\",\n \"policy_engine_mode\": \"all\",\n \"user_matching_mode\": \"identifier\",\n \"managed\": \"string\",\n \"user_path_template\": \"string\",\n \"icon\": \"string\"\n },\n \"created\": \"2024-07-29T15:51:28.071Z\",\n \"identifier\": \"string\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"400"}
value={"400"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"non_field_errors"}
required={false}
schemaName={"string[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string"}}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"code"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
name={"property name*"}
required={false}
schemaName={"any"}
qualifierMessage={undefined}
schema={{"type":"object","description":"Validation Error","properties":{"non_field_errors":{"type":"array","items":{"type":"string"}},"code":{"type":"string"}},"additionalProperties":{},"title":"ValidationError"}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"non_field_errors\": [\n \"string\"\n ],\n \"code\": \"string\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"403"}
value={"403"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"detail"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"code"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"detail\": \"string\",\n \"code\": \"string\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem>
</ApiTabs>
</div>
</div>