Let users create, list, and revoke manual bearer tokens from /me/oauth-tokens, scoped to their identity rather than an organization. Manual tokens store a null client_id and are authorized with a self-manage IAM policy. Wire Connect GraphQL on Identity (list, create, revoke), add console UI with scoped create flow and credentials dialog, and cover the flow in e2e tests. Fix list pagination ordering and keep the Relay connection in sync after create. Signed-off-by: Ludovic Vielle <ludovic@probo.com>
60 lines
1.3 KiB
GraphQL
60 lines
1.3 KiB
GraphQL
type Identity implements Node {
|
|
id: ID!
|
|
email: EmailAddr!
|
|
fullName: String!
|
|
emailVerified: Boolean!
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
|
|
profiles(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
orderBy: ProfileOrder
|
|
filter: ProfileFilter
|
|
): ProfileConnection @goField(forceResolver: true)
|
|
|
|
sessions(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
orderBy: SessionOrder
|
|
): SessionConnection @goField(forceResolver: true)
|
|
|
|
personalAPIKeys(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): PersonalAPIKeyConnection
|
|
@goField(forceResolver: true)
|
|
@authentication(required: PRESENT)
|
|
@sessionOnly
|
|
|
|
oauth2AccessTokens(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): OAuth2AccessTokenConnection
|
|
@goField(forceResolver: true)
|
|
@authentication(required: PRESENT)
|
|
@sessionOnly
|
|
|
|
invitingOrganizations: [Organization!]!
|
|
@goField(forceResolver: true)
|
|
@authentication(required: PRESENT)
|
|
@sessionOnly
|
|
|
|
ssoLoginURL: String
|
|
@goField(forceResolver: true)
|
|
@authentication(required: PRESENT)
|
|
@sessionOnly
|
|
|
|
permission(action: String!): Boolean!
|
|
@goField(forceResolver: true)
|
|
@authentication(required: PRESENT)
|
|
}
|