* Export constants and type assertion utilities * Add permission set support to oauth provider * improve permission set parsing * Rename `PermissionSet` to `ScopePermissions` * Improve performance of NSID validation * Add support for `permission-set` in lexicon document * Validate NSID syntax using `@atproto/syntax` * Export all types used in public interfaces (from `lexicon-resolver`) * Small performance improvement * Rework scope parsing utilities to work with Lexicon defined permissions * file rename * fixup! Rework scope parsing utilities to work with Lexicon defined permissions * removed outdated comment * removed outdated comment * fix comment typo * Improve `SimpleStore` api * permission-set NSID auth scopes * Remove dev dependency on dev-env * fix build script * pnpm-lock * Improve fetch-node unicast protection * Explicitly set the `redirect: "follow"` `fetch()` option * Add delay when building oauth-provider-ui in watch mode * Remove external dependencies from auth-scopes * Add customizable lexicon authority to pds (for dev purposes) * fix pds migration * update permission-set icon * Add support for `include:` syntax in scopes * tidy * Renaming of "resource" concept to better reflect the fact that not all oauth scope values are about resources * changeset * ui improvmeents * i18n * ui imporvements * add `AtprotoAudience` type * Enforce proper formatting of audience (atproto supported did + fragment part) * tidy * tidy * tidy * fix ci ? * ci fix ? * tidy ? * Apply consistent outline around focusable items * Use `inheritAud: true` to control `aud` inheritance * Update packages/oauth/oauth-provider/src/lexicon/lexicon-manager.ts Co-authored-by: devin ivy <devinivy@gmail.com> * Review comments * Add `nsid` property to `LexiconResolutionError` * improve nsid validation * i18n * Improve oauth scope parsing * Simplify lex scope parsing * tidy * docs * tidy * ci * Code simplification * tidy * improve type safety * improve deps graph * naming * Improve tests and package structure * Improve error when resolving a non permission-set * improve nsid parsing perfs * benchmark * Refactor ozone and lexicon into using a common service profile mechanism * improve perfs * ci fix (?) * tidy * Allow storage of valid lexicons in lexicon store * Improve handling of lexicon resolution failures * review comment * Test both regexp and non regexp based nsid validation * properly detect presence of port number in https did:web * Re-enable logging of `safeFetch` requests * tidy --------- Co-authored-by: devin ivy <devinivy@gmail.com>
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import type { CustomizationData, Session } from '@atproto/oauth-provider-api'
|
|
import type { LexPermissionSet } from '@atproto/oauth-scopes'
|
|
import type { OAuthClientMetadata } from '@atproto/oauth-types'
|
|
|
|
export type PermissionSet = LexPermissionSet
|
|
export type PermissionSets = Record<string, undefined | PermissionSet>
|
|
|
|
export type AuthorizeData = {
|
|
requestUri: string
|
|
|
|
clientId: string
|
|
clientMetadata: OAuthClientMetadata
|
|
clientTrusted: boolean
|
|
clientFirstParty: boolean
|
|
|
|
scope?: string
|
|
loginHint?: string
|
|
uiLocales?: string
|
|
permissionSets: PermissionSets
|
|
}
|
|
|
|
export type ErrorData = {
|
|
error: string
|
|
error_description: string
|
|
}
|
|
|
|
export type HydrationData = {
|
|
/**
|
|
* Matches the variables needed by `authorization-page.tsx`
|
|
*/
|
|
'authorization-page': {
|
|
__customizationData: CustomizationData
|
|
__authorizeData: AuthorizeData
|
|
__sessions: readonly Session[]
|
|
}
|
|
'error-page': {
|
|
/**
|
|
* Matches the variables needed by `error-page.tsx`
|
|
*/
|
|
__customizationData: CustomizationData
|
|
__errorData: ErrorData
|
|
}
|
|
}
|