diff --git a/flows/oauth2Flows.md b/flows/oauth2Flows.md index 4da98777b..edf0ffe62 100644 --- a/flows/oauth2Flows.md +++ b/flows/oauth2Flows.md @@ -15,10 +15,13 @@ { status : "OK", clientInfo : { - clientId: string, - clientSecret: string, - scopes: string[], - timeCreated: number + name: string + clientId: string, + clientSecret: string, + scopes: string[], + redirectUris: string[], + timeCreated: number, + timeUpdated: number } } | { status : "CLIENT_ALREADY_EXISTS_ERROR" @@ -27,4 +30,58 @@ scope : string } ``` -- Flow diagram: https://app.code2flow.com/flowcharts/6475a4953f4c2482c82a4352 \ No newline at end of file +- Flow diagram: https://app.code2flow.com/flowcharts/6475a4953f4c2482c82a4352 + + +## 2. Get oauth2 client +- Path: "/appid-/recipe/oauth2/client/" +- Method: GET +- Input Params: + - ```clientId=string``` +- Output: +``` +{ + status: "OK", + name: string, + clientInfo : { + name: string, + clientId: string, + clientSecret: string, + scopes: string[], + redirectUris: string[], + timeCreated: number, + timeUpdated: number + }, + authorizationCodes: [ + { + tenantId: string, + sessionHandle: string, + scopes: string[], + accessType: string, + codeChallenge?: string, + codeChallengeMethod?: string, + redirectUri: string, + timeCreated: number, + timeExpires: number + } + ], + issuedTokens: [ + { + id: string, + tenantId: string, + sessionHandle: string, + scopes: string[], + accessTokenHash: string, + refreshTokenHash?: string, + timeCreated: number, + lastUpdated: number, + timeAccessTokenExpires: number, + timeRefreshTokenExpires?: number + } + ] +} | { + status : "UNKONWN_CLIENT_ID_ERROR" +} + +``` +- Flow diagram: https://app.code2flow.com/flowcharts/6475cc5b3f4c2482c82a736a