
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@magda/authentication-plugin-sdk
Advanced tools
Please information please refer to the Authentication Plugin Spec
Existing Magda Authentication Plugins can be found from here.
You can use this repo as a template to create your own magda authentication plugin.
/**
* Create an express router that can be used to enable session on an express application.
*
* @export
* @param {MagdaSessionRouterOptions} options
* @returns {Router}
*/
export declare function createMagdaSessionRouter(
options: MagdaSessionRouterOptions
): Router;
/**
* Verify the user using the user profile received during the authentication.
* If a user can be located, return UserToken type data.
* Otherwise, create a new user and return UserToken type data .
*
* @export
* @param {AuthApiClient} authApi
* @param {passport.Profile} profile
* @param {string} source
* @param {(
* authApiClient: AuthApiClient,
* userData: User,
* profile: passport.Profile
* ) => Promise<User>} [beforeUserCreated] an optional handler that will be called just before a user is created.
* The user data returned by this handler will be used to create a user record. The following parameters will be provided to the handler:
* - authApiClient: Auth API Client. You can use it to add a role to the user.
* - userData: the user data that is converted from the user profile received using the default conversion logic.
* - profile: the user profile received
*
* @param {(
* authApiClient: AuthApiClient,
* user: User,
* profile: passport.Profile
* ) => Promise<void>} [afterUserCreated] an optional call that will be called when a user has just been created.
* The following parameters will be provided to the handler:
* - authApiClient: Auth API Client. You can use it to add a role to the user.
* - user: the user data of the magda user that is just created.
* - profile: the user profile received
*
* @returns {Promise<UserToken>}
*/
export declare function createOrGetUserToken(
authApi: AuthApiClient,
profile: passport.Profile,
source: string,
beforeUserCreated?: (
authApiClient: AuthApiClient,
userData: User,
profile: passport.Profile
) => Promise<User>,
afterUserCreated?: (
authApiClient: AuthApiClient,
user: User,
profile: passport.Profile
) => Promise<void>
): Promise<UserToken>;
FAQs
MAGDA Authentication Plugin SDK
The npm package @magda/authentication-plugin-sdk receives a total of 53 weekly downloads. As such, @magda/authentication-plugin-sdk popularity was classified as not popular.
We found that @magda/authentication-plugin-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.