MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / UserSignIn

Function UserSignIn

packages/xadmin-auth/src/models.js:4–34  ·  view source on GitHub ↗
({ context: { _t } })

Source from the content-addressed store, hash-verified

2
3// Forms
4const UserSignIn = ({ context: { _t } }) => ({
5 type: 'object',
6 name: 'user_sign_in',
7 resource: 'auth/login',
8 title: _t('Sign In'),
9 properties: {
10 username: {
11 title: _t('Username'),
12 type: 'string'
13 },
14 password: {
15 title: _t('Password'),
16 type: 'string'
17 },
18 ...(_c('auth.login.captcha')?{
19 code: {
20 title: _t('Captcha Code'),
21 type: 'string',
22 fieldType: 'captcha'
23 }
24 }:{})
25 },
26 required: [ 'username', 'password', ...(_c('auth.login.captcha')?[ 'code' ]:[]) ],
27 form: [
28 'username',
29 { key: 'password', attrs: { type: 'password' } },
30 ...(_c('auth.login.captcha')?[ {
31 key: 'code', captcha_url: '/' + _c('auth.login.captcha')
32 } ]:[])
33 ]
34})
35
36const UserSignOut = ({ context: { _t } }) => ({
37 type: 'object',

Callers 1

mappers.jsFile · 0.90

Calls 1

_tFunction · 0.50

Tested by

no test coverage detected