Skip to content

Fabiopf02/auth-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auth-test

/auth POST

https://auth-jwt-test.herokuapp.com/auth

  body {
    ...,
  }
  header {
    expiresIn?: <number>,
    time?: <number> (opcional)
  }
  

retorno

  {
    user: {
      ...body,
      createdAt: <Date>,
    },
    expiresIn: <number>,
    token: <string>
  }

/private GET

https://auth-jwt-test.herokuapp.com/private

  header {
    Authorization: Bearer <token>,
    id: <string>,
    time?: <number> (opcional)
  }

retorno

  {
    status: <string>
  }

Detalhes

Rota body header
/auth qualquer (obrigatório) expiresIn: expiração do token (seg.), time: Tempo de espera
/private Nenhum Authorization: Bearer + <token>, id: retornado pela /auth, time: tempo de espera (seg.)

Releases

No releases published

Packages

No packages published