Skip to content

Commit

Permalink
Merge pull request #15 from mindsphere/feat/insights-hub
Browse files Browse the repository at this point in the history
feat: 2.0.0 release (manifest 3)
  • Loading branch information
sn0wcat authored Jan 2, 2024
2 parents bb45274 + cc2e96e commit 1ff7cb4
Show file tree
Hide file tree
Showing 12 changed files with 1,830 additions and 4,246 deletions.
17 changes: 0 additions & 17 deletions .eslintrc.json

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ dist/

*.crx
*.pem

# MAC .DS_STORE
.DS_Store

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.0.0 January 2024

- renamed MindSphere to Insights Hub
- fixed the layout issues which were introduced with the new way how Chrome treats extensions
- updated links to point directly to [Siemens Xcelerator Developer Portal](https://developer.siemens.com)
- updated Chrome Manifest to Version 3
- bumped dependencies

## 1.0.4 September 2021

- show the cookies even when there is no XSRF_TOKEN
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# MindSphere Authorization Helper Chrome Extension
# Insights Hub and Industrial IoT Authorization Helper Chrome Extension

MindSphere has evolved into [Insights Hub](https://plm.sw.siemens.com/en-US/insights-hub/).

![logo](images/authentication-helper2.png)

This chrome extension can be used to simplify the development tasks for which you need to use the [SESSION and XSRF-TOKEN](https://developer.mindsphere.io/howto/howto-local-development.html#generate-user-credentials) to access MindSphere APIs. It provides an easy way to copy the MindSphere authentication cookies to the clipboard without having to go to chrome developer tools.
This chrome extension can be used to simplify the development tasks for which you need to use the [SESSION and XSRF-TOKEN](https://developer.mindsphere.io/howto/howto-local-development.html#generate-user-credentials) to access Insights Hub and Indutrial IoT APIs. It provides an easy way to copy the Insights Hub and Indutrial IoT authentication cookies to the clipboard without having to go to chrome developer tools.

## Installation

Go to <a href="https://chrome.google.com/webstore/detail/mindsphere-authentication/licndiiilobojikmhmmcgdbpmnmdeoee"><i class="fab fa-chrome"></i> chrome web store</a> and click on **add to chrome**.

Once the extension is installed: log in to your MindSphere tenant, navigate to your application and click on the extension icon to display the available application cookies. You can now click e.g. on **session** or **Xsrf** button which will copy the corresponding cookie to your clipboard.
Once the extension is installed: log in to your Insights Hub and Indutrial IoT tenant, navigate to your application and click on the extension icon to display the available application cookies. You can now click e.g. on **session** or **Xsrf** button which will copy the corresponding cookie to your clipboard.

![screenshot](images/screenshot.extension.png)

Expand All @@ -24,20 +26,20 @@ curl -vv \
https://<tenantId>-<appId>-<tenantId>.<regionId>.mindsphere.io/api/assetmanagement/v3/assets
```

## Using the cookies with MindSphere CLI
## Using the cookies with Insights Hub and Indutrial IoT CLI

The extension works really well with the MindSphere CLI in the [Session Cookie - XSRF-Token Configuration](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/setting-up-the-cli.html#tab1anchor3) because the **Bash**, **PS**, and **CMD** buttons already copy the cookies in the required format for MindSphere CLI.
The extension works really well with the Insights Hub and Indutrial IoT CLI in the [Session Cookie - XSRF-Token Configuration](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/setting-up-the-cli.html#tab1anchor3) because the **Bash**, **PS**, and **CMD** buttons already copy the cookies in the required format for Insights Hub and Indutrial IoT CLI.

Use the extension to copy the cookies to the clipboard, paste them to the command line and start using the [MindSphere CLI](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/index.html) right away.
Use the extension to copy the cookies to the clipboard, paste them to the command line and start using the [Insights Hub and Indutrial IoT CLI](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/index.html) right away.

![cli](images/cookieresult.png)

## Using the cookies with MindSphere Development Proxy
## Using the cookies with Insights Hub and Indutrial IoT Development Proxy

You can also use the extension to simplify the start of [MindSphere Development Proxy](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/development-proxy.html) in a similar fashion. Just copy/paste the cookies to the command line and [start the development proxy](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/development-proxy.html#tab1anchor1).
You can also use the extension to simplify the start of [Insights Hub and Indutrial IoT Development Proxy](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/development-proxy.html) in a similar fashion. Just copy/paste the cookies to the command line and [start the development proxy](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/development-proxy.html#tab1anchor1).

![cli](images/proxy-cookie.png)

This will start the development proxy with the credentials of the logged in users so that you can test the MindSphere authentication and authorization also in the local environment.
This will start the development proxy with the credentials of the logged in users so that you can test the Insights Hub and Indutrial IoT authentication and authorization also in the local environment.

**Important: Treat the authentication cookies like your credentials and use them only in secure environments.**
24 changes: 20 additions & 4 deletions assets/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
/** @format */

body {
min-width: 650px !important;
min-height: 600px !important;
}

#_mdspcontent {
margin-top: 25px;
font-size: 21px;
text-align: center;
animation: fadein 2s;
-moz-animation: fadein 2s; /* Firefox */
-webkit-animation: fadein 2s; /* Safari and Chrome */
-o-animation: fadein 2s; /* Opera */
animation: fadein 1s;
-moz-animation: fadein 1s; /* Firefox */
-webkit-animation: fadein 1s; /* Safari and Chrome */
-o-animation: fadein 1s; /* Opera */
}
@keyframes fadein {
from {
Expand Down Expand Up @@ -44,3 +49,14 @@
opacity: 1;
}
}

a.siemensblue {
text-decoration: none;
}
a.siemensblue:hover {
color: #0c2847 !important;
}

i.heartred:hover {
color: #af235f !important;
}
Binary file modified images/cookieresult.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/proxy-cookie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/screenshot.extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1ff7cb4

Please sign in to comment.