---
updatedAt: 2026-03-25T18:56:40.000Z
agentTools:
  projectIndex: https://developer.getbright.se/llms.txt
---

# Authorization

Learn how Bright Energy segments authorization and which types are supported.

Authorization for *Kit* is dependent on several factors. As this is your integration built for use by Bright Energy, architecture, <Glossary>User</Glossary> country and security restrictions will all play a factor in deciding the authorization methods enabled.

There are two groups of authorization methods:

* <Glossary>User</Glossary> Authorization
* <Glossary>Data Layer</Glossary> Authorization

<br />

## User Authorization

### BankId (Sweden)

In Sweden the most well known login eID solution is [BankId](https://www.bankid.com/).

BankID is a common way to identify yourself in digital environments. You do not have to create accounts with passwords with different actors, and can instead use the same secure solution for everyone. Like showing your ID, but digitally.

In order for your end-users to trust the application and login securely, we relay all BankId API calls to your backend so the end-user will see your company name and certificate in the BankId app.

#### Test BankId

If you do not have a BankId for personal use already, please obtain a test bankId from: <https://developers.bankid.com/test-portal/bankid-for-test>

Afterwards you can test if it works at: <https://test.bankid.com/>

#### Get a BankId certificate

You must order a BankId certificate from one of the approved banks found at: <https://www.bankid.com/en/foretag/kontakt-foeretag>.

<br />

### OpenId

OpenID is an easy and safe way for people to reuse an existing account and user profile from an identity provider, for example Apple, Google, or Microsoft to login to any OpenID-enabled applications and websites without creating a new registration and password. You choose the provider, such as Google and enter your Gmail address and password to login.

#### Requirements

* You must expose your`.well-known/openid-configuration`for Bright Energy to read.
* `client_Id`, `client_secret` and `scope` needs to be sent to your <Glossary>Customer Success Manager</Glossary> in a secure manner.
* You need to configure the following callbackUrl's:

| Callback URL's                                                                                  | Purpose                          |
| :---------------------------------------------------------------------------------------------- | :------------------------------- |
| https\://my-organisation-name.production.getbright.se/v3/auth/my-organisation-name/callback       | Production callback URL          |
| https\://my-organisation-name.staging.getbright.se/v3/auth/my-organisation-name/callback          | Staging callback URL             |
| <https://mypagesURL/auth/my-organisation-name/callback>                                          | My Pages Production callback URL |
| <https://mypages>.my-organisation-name.staging.getbright.se/v3/auth/my-organisation-name/callback | My Pages Production callback URL |

> 📘 Only if you have a My Pages setup do you need My Pages callback URLs.

Learn more at: <https://openid.net/developers/how-connect-works/>

#### [openId](https://developer.getbright.se/reference/openid) endpoints

The endpoints in [openId](https://developer.getbright.se/reference/openid) are provided as **examples** so you can test your OpenID setup with Bright Kit. Please build your OpenID integration to the specification: <https://swagger.io/docs/specification/v3_0/authentication/openid-connect-discovery/>.

If you do not have an OpenId solution provider today, we recommend [Signicat](#signicat) .

<br />

### Signicat

Signicat is an all-in-one solution for using the country specific eID for your <Glossary>User</Glossary>s login. Read more at: [Signicat Developer Hub](https://developer.signicat.com/docs/) to see what methods are included in each country and how to get started with your own Signicat account.

<br />

### One-time code via email

If some of your <Glossary>User</Glossary>s cannot login with [bankId](https://developer.getbright.se/reference/bankid) we can enable an email login using a single use verification code. Please note that users should be uniquely identified with their email address and have access to a single <Glossary>Account</Glossary> only.

<br />

## Data Layer Authorization

Bright Energy requires access to your entire data layer at any time regardless user interactions. This is due to the requirement to implement the [Data Synchronisation](https://developer.getbright.se/docs/data-synchronisation) for an optimal <Glossary>User</Glossary> experience.

### API Key

The simplest method to implement is an *apiKey* header.

The API key must be environment specific, generated by the <Glossary>Organisation</Glossary> and able to be revoked and replaced in the event of a security exposure.

The *header* name can be anything, for example `Ocp-Apim-Subscription-Key`and the correct value.

<br />

### Bearer: Access Token

Using the *Authorization* header in combination with a valid `access_token` generated from [oauth](https://developer.getbright.se/reference/oauth) or [openId](https://developer.getbright.se/reference/openid).  It is possible to use a pre-generated JWT token that never expires, similar to an *apiKey*, but we recommend an [oauth](https://developer.getbright.se/reference/oauth) implementation to increase security.