neo4j-client-sso
Version:
Single sign-on client (frontend) library for Neo4j products
148 lines (147 loc) • 4.82 kB
JavaScript
/*
* Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const exampleSSOProvider = {
id: 'okta-oidc',
name: 'Okta',
auth_flow: 'pkce',
auth_endpoint: 'https://dev.okta.com/oauth2/default/v1/authorize',
well_known_discovery_uri: 'https://dev.okta.com/oauth2/default/.well-known/openid-configuration',
params: {
client_id: 'cxkvjcvkxlcjbvl',
response_type: 'code',
redirect_uri: 'http://localhost:8085?idp_id=okta-oidc',
scope: 'openid profile email groups'
},
config: {
implicit_flow_requires_nonce: false,
token_type_principal: 'id_token',
token_type_authentication: 'access_token',
principal: 'sub'
},
visible: true
};
export const exampleSSOProviderTwo = {
id: 'keycloak-oidc',
name: 'Keycloak',
auth_flow: 'pkce',
auth_endpoint: 'https://keycloak.com/oauth2/default/v1/authorize',
params: {
client_id: 'cxkvjcvkxlcjbvl',
response_type: 'code',
redirect_uri: 'http://localhost:8085?idp_id=keycloak-oidc',
scope: 'openid profile email groups'
},
config: {
implicit_flow_requires_nonce: false,
token_type_principal: 'id_token',
token_type_authentication: 'access_token',
principal: 'sub'
},
visible: true
};
export const exampleSSOProviderFull = {
id: 'okta-oidc',
name: 'Okta',
auth_flow: 'pkce',
auth_endpoint: 'https://dev.okta.com/oauth2/default/v1/authorize',
token_endpoint: 'https://dev.okta.com/oauth2/default/v1/token',
well_known_discovery_uri: 'https://dev.okta.com/oauth2/default/.well-known/openid-configuration',
params: {
client_id: 'cxkvjcvkxlcjbvl',
redirect_uri: 'http://localhost:8085?idp_id=okta-oidc',
response_type: 'code',
scope: 'openid profile email groups'
},
auth_params: {
client_secret: 'jsfsdhfhskfjsdfksdkljfljksf',
test: 'arg'
},
token_params: {
arg: 'test'
},
config: {
implicit_flow_requires_nonce: false,
token_type_principal: 'id_token',
token_type_authentication: 'access_token',
principal: 'sub',
code_challenge_method: 'S256'
},
visible: true
};
export const exampleSSOProviderMinimal = {
id: 'okta-oidc',
name: 'Okta',
auth_flow: 'pkce',
auth_endpoint: 'https://dev.okta.com/oauth2/default/v1/authorize',
params: {
client_id: 'cxkvjcvkxlcjbvl',
redirect_uri: 'http://localhost:8085?idp_id=okta-oidc',
response_type: 'code',
scope: 'openid profile email groups'
},
visible: true
};
export const exampleSSOProvider4dot4Format = {
id: 'okta-oidc',
name: 'Okta',
auth_flow: 'pkce',
auth_endpoint: 'https://dev.okta.com/oauth2/default/v1/authorize',
well_known_discovery_uri: 'https://dev.okta.com/oauth2/default/.well-known/openid-configuration',
redirect_uri: 'http://localhost:8085?idp_id=okta-oidc',
params: {
client_id: 'cxkvjcvkxlcjbvl',
response_type: 'code',
scope: 'openid profile email groups'
},
config: {
implicit_flow_requires_nonce: false,
token_type_principal: 'id_token',
token_type_authentication: 'access_token',
principal: 'sub'
},
visible: true
};
export const exampleSSOProvider4dot4FormatSlim = {
auth_flow: 'pkce',
id: 'azure-oidc3'
};
export const exampleSSOProvider4dot4FormatSlimExt = {
well_known_discovery_uri: 'https://login.microsoftonline.com/.well-known/openid-configuration',
auth_flow: 'pkce',
id: 'azure-oidc3',
config: {
implicit_flow_requires_nonce: false,
token_type_principal: 'id_token',
token_type_authentication: 'access_token',
principal: 'sub'
},
visible: true
};
export const exampleSSOProviderMissingVisible = {
id: 'okta-oidc',
name: 'Okta',
auth_flow: 'pkce',
auth_endpoint: 'https://dev.okta.com/oauth2/default/v1/authorize',
params: {
client_id: 'cxkvjcvkxlcjbvl',
redirect_uri: 'http://localhost:8085?idp_id=okta-oidc',
response_type: 'code',
scope: 'openid profile email groups'
}
};