( session: BuddyReactionSessionInput, )
| 15 | } |
| 16 | |
| 17 | export function resolveBuddyReactionSession( |
| 18 | session: BuddyReactionSessionInput, |
| 19 | ): BuddyReactionSession | null { |
| 20 | if ( |
| 21 | session?.principalSource !== 'managed_oauth' || |
| 22 | session.providerPlan.mode !== 'noumena_managed' || |
| 23 | session.headersKind !== 'bearer' || |
| 24 | !session.accessToken || |
| 25 | !session.identity.organizationUuid |
| 26 | ) { |
| 27 | return null |
| 28 | } |
| 29 | |
| 30 | return { |
| 31 | accessToken: session.accessToken, |
| 32 | organizationUuid: session.identity.organizationUuid, |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | export function getCurrentBuddyReactionSession(): BuddyReactionSession | null { |
| 37 | return resolveBuddyReactionSession(getAuthRuntime().getCurrentSession()) |
no outgoing calls
no test coverage detected