signalk-server
Version:
An implementation of a [Signal K](http://signalk.org) server for boats.
50 lines • 1.51 kB
JavaScript
;
/*
* Copyright 2025 Matti Airas
*
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.STATE_MAX_AGE_MS = exports.STATE_COOKIE_NAME = exports.OIDC_DEFAULTS = exports.OIDCError = void 0;
/**
* OIDC Error class
*/
class OIDCError extends Error {
code;
cause;
constructor(message, code, cause) {
super(message);
this.code = code;
this.cause = cause;
this.name = 'OIDCError';
Error.captureStackTrace(this, OIDCError);
}
}
exports.OIDCError = OIDCError;
/**
* Default OIDC configuration values
*/
exports.OIDC_DEFAULTS = {
enabled: false,
scope: 'openid email profile',
defaultPermission: 'readonly',
autoCreateUsers: true,
providerName: 'SSO Login',
autoLogin: false
};
/**
* State cookie configuration
*/
exports.STATE_COOKIE_NAME = 'OIDC_STATE';
exports.STATE_MAX_AGE_MS = 10 * 60 * 1000; // 10 minutes
//# sourceMappingURL=types.js.map