简体   繁体   English

如何验证 jhipster 离子登录

[英]how to authenticate jhipster ionic login

I am trying to create an ionic app, This app uses a jhipster created web-app as intranet with HTTP session authentication .我正在尝试创建一个离子应用程序,该应用程序使用jhipster创建的网络应用程序作为具有HTTP 会话身份验证的内联网。 How should i authenticate user in ionic app who is already created in jhipster.我应该如何验证已在 jhipster 中创建的 ionic 应用程序中的用户。

JHipster configuration, a .yo-rc.json file generated in the root folder JHipster配置,根目录下生成的.yo-rc.json文件

{
"generator-jhipster": {
"jhipsterVersion": "3.0.0",
"baseName": "vconnect",
"packageName": "com.zenfact.vconnect",
"packageFolder": "com/zenfact/vconnect",
"serverPort": "8080",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": "elasticsearch",
"buildTool": "maven",
"enableSocialSignIn": false,
"rememberMeKey": "559bbe3167552d040ba24d16506d389a7ba851c3",
"useSass": false,
"applicationType": "monolith",
"testFrameworks": [
"gatling"
],
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en",
"zh-cn",
"fr",
"hi",
"ja"
]
}
}

I did some digging around and found that mobile apps are not a big fan of cookies.我做了一些挖掘,发现移动应用程序不是 cookie 的忠实粉丝。

Thus have decided to recreate the jhipster application to either oauth or JWT因此决定重新创建jhipster应用程序到oauthJWT

Note:注意:

  1. Jhipster has 3 authentication method JWT, Oauth2 and HTTP session. Jhipster 有 3 种身份验证方法 JWT、Oauth2 和 HTTP 会话。

  2. I initially started with a Jhipster project with HTTP session.我最初从一个带有 HTTP 会话的 Jhipster 项目开始。

  3. I was separately creating a ionic app project which was supposed to consume the rest call of this jhipster application.我正在单独创建一个离子应用程序项目,该项目应该消耗这个 jhipster 应用程序的其余调用。

  4. Long story short after some trial and error I came to realization to just recreate the ionic app with either JWT or Oauth2 authentication.长话短说,经过一些反复试验,我意识到只需使用 JWT 或 Oauth2 身份验证重新创建离子应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM