Git Product home page Git Product logo

magnolia-module-logininfo's Introduction

Magnolia Module Logininfo

Simple module to display useful information on Magnolia Admincentral login screen

-- This module allows to display few information on a Magnolia CMS Login screen, useful to let editorial and admin team to understand on which environment they are loggin in.

Installation

The quicker way to try this module is to download the .jar from releases and drop it in WEB-INF/lib folder of your Magnolia instance.

For a "pro" and indeed better usage, clone/fork this repo, declare it in your webapp pom.xml using the following Maven dependency:

<!-- Magnolia Module LoginInfo -->
<dependency>
    <groupId>com.matteopelucco.magnolia</groupId>
    <artifactId>magnolia-module-logininfo</artifactId>
    <version>1.0.0</version>
</dependency>

If everything works fine, you should see the following standard information at Magnolia startup:

Magnolia Module Logininfo - Installation 1

Just install it. No additional information are required. When installation ends, your login screen should appear with a new header bar:

Magnolia Module Logininfo - Installation 2

This module has been succesfully tested against Magnolia CE / EE 5.4.x

Configuration

What this module does in the background? During installation, it replace the standard "form" securityCallback:

Magnolia Module Logininfo - Installation 2

with a dedicated class, able to expose a new infofn Freemarker utility, and a dedicated HTML file. This file, a Freemarker file to be more precise, is taken from the Community Edition of the current Magnolia installation, adding a simple header bar on top.

What you can do

The simplest usage is to enter 2 lines of text:

  • loginSummary: a kind of a "title", rendererd as an H3.
  • loginDetail: a kind of a "subtitle", rendered as an H4.

But if you want to display instance-specific information, you can use Magnolia Properties, with the following syntax:

props['propname']

By default, module installs with this approach for the second line:

Magnolia Module Logininfo - First Login

Feel free to change it, or to use as many properties you need (full properties list is available in "About Magnolia" config app)

Examples

You can put static text, like this:

Magnolia Module Logininfo - Static text

Or you can show a lot of properties, mixed with text:

Magnolia Module Logininfo - Props and text

Or you can send useful messages to editors:

Magnolia Module Logininfo - Message to editors

If needed, you can disable it removing the lines from Magnolia Module Logininfo cofiguration:

Magnolia Module Logininfo - Message to editors

In this way, you can mix advanced environment configuration, decorating for instance only Author Instances and leaving Public Instances in the standard format, to avoid to offer server-side information to potential attackers (but consider to hide /.magnolia to the public. this is much, much better..)

Fallback or module removal

After module wrong installation or customization, or module removal, you can encounter a screen like the following one:

Magnolia Module Logininfo - SecurityCallback error

In this case, you can use a different login method to bypass the "form" one: just put the following queryString:

?mgnlUserId=username&mgnlUserPSWD=password

Magnolia Module Logininfo - Alternative login method

In this way you can tune your Magnolia instance to use the standard configuration for "form" callback:

class: info.magnolia.cms.security.auth.callback.FormClientCallback
loginForm: /defaultMagnoliaLoginForm/login.html

License

Feel free to use this module as you want. But if you use it and you like it, let me know!

magnolia-module-logininfo's People

Contributors

matteopelucco avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.