Add OAuth2/OpenID Connect authorization server
Implement a full OAuth2 2.0 and OpenID Connect 1.0 authorization server with support for authorization code flow (with PKCE), refresh token rotation, device authorization grant, dynamic client registration, token introspection, and token revocation. Includes database schema, coredata layer, service logic, HTTP handlers, OIDC discovery endpoint, and JWKS publishing. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
42
pkg/server/api/connect/v1/graphql/oauth2.graphql
Normal file
42
pkg/server/api/connect/v1/graphql/oauth2.graphql
Normal file
@@ -0,0 +1,42 @@
|
||||
extend type Mutation {
|
||||
authorizeDevice(
|
||||
input: AuthorizeDeviceInput!
|
||||
): AuthorizeDevicePayload @session(required: PRESENT)
|
||||
|
||||
approveConsent(
|
||||
input: ApproveConsentInput!
|
||||
): ApproveConsentPayload @session(required: PRESENT)
|
||||
}
|
||||
|
||||
|
||||
input AuthorizeDeviceInput {
|
||||
userCode: String!
|
||||
}
|
||||
|
||||
type AuthorizeDevicePayload {
|
||||
success: Boolean!
|
||||
consentId: ID
|
||||
}
|
||||
|
||||
type Consent implements Node {
|
||||
id: ID!
|
||||
application: Application! @goField(forceResolver: true)
|
||||
scopes: [String!]!
|
||||
}
|
||||
|
||||
type Application implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
logoUrl: String
|
||||
url: String
|
||||
}
|
||||
|
||||
input ApproveConsentInput {
|
||||
consentId: ID!
|
||||
approved: Boolean!
|
||||
}
|
||||
|
||||
type ApproveConsentPayload {
|
||||
redirectURL: String
|
||||
deviceAuthorized: Boolean
|
||||
}
|
||||
Reference in New Issue
Block a user