简体   繁体   中英

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 . How should i authenticate user in ionic app who is already created in jhipster.

JHipster configuration, a .yo-rc.json file generated in the root folder

{
"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.

Thus have decided to recreate the jhipster application to either oauth or JWT

Note:

  1. Jhipster has 3 authentication method JWT, Oauth2 and HTTP session.

  2. I initially started with a Jhipster project with HTTP session.

  3. I was separately creating a ionic app project which was supposed to consume the rest call of this jhipster application.

  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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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