mirror of
https://github.com/LukeHagar/OpenAPI.gg.git
synced 2025-12-06 04:20:29 +00:00
72 lines
1.1 KiB
TypeScript
72 lines
1.1 KiB
TypeScript
import type {
|
|
ApiKeyAuth,
|
|
BasicAuth,
|
|
BearerAuth,
|
|
CookieAuth,
|
|
OAuth2Auth,
|
|
OpenIdConnectAuth
|
|
} from './types/auth';
|
|
|
|
export const basicAuthTemplate: BasicAuth = {
|
|
identifier: '',
|
|
type: 'http',
|
|
scheme: 'basic'
|
|
};
|
|
|
|
export const bearerAuthTemplate: BearerAuth = {
|
|
identifier: '',
|
|
type: 'http',
|
|
scheme: 'bearer',
|
|
bearerFormat: ''
|
|
};
|
|
|
|
export const apiKeyAuthTemplate: ApiKeyAuth = {
|
|
identifier: '',
|
|
type: 'apiKey',
|
|
in: 'header',
|
|
name: ''
|
|
};
|
|
|
|
export const openIdAuthTemplate: OpenIdConnectAuth = {
|
|
identifier: '',
|
|
type: 'openIdConnect',
|
|
openIdConnectUrl: ''
|
|
};
|
|
|
|
export const oauth2AuthTemplate: OAuth2Auth = {
|
|
identifier: '',
|
|
type: 'oauth2',
|
|
description: '',
|
|
flows: []
|
|
};
|
|
|
|
export const cookieAuthTemplate: CookieAuth = {
|
|
identifier: '',
|
|
type: 'apiKey',
|
|
in: 'cookie',
|
|
name: ''
|
|
};
|
|
|
|
export const oauth2FlowTemplates = {
|
|
authorizationCode: {
|
|
name: 'authorizationCode',
|
|
authorizationUrl: '',
|
|
tokenUrl: '',
|
|
scopes: []
|
|
},
|
|
implicit: {
|
|
name: 'implicit',
|
|
authorizationUrl: '',
|
|
scopes: []
|
|
},
|
|
password: {
|
|
name: 'password',
|
|
tokenUrl: '',
|
|
scopes: []
|
|
},
|
|
clientCredentials: {
|
|
name: 'clientCredentials',
|
|
tokenUrl: ''
|
|
}
|
|
};
|