• Api Documentation
Show / Hide Table of Contents
  • Softadmin.Api
    • AdminMessageException
    • CustomComponent
    • ICookies
    • ICredentialsStore
    • IEnvironment
    • IForwardState
    • IHttpHeaders
    • IParameters
    • ISessionVariables
    • ISystemSettings
    • Plugin
  • Softadmin.Api.Database
    • IDbRequest
    • IDbRequestFactory
  • Softadmin.Api.Diagnostics
    • ILogger
  • Softadmin.Api.Login
    • IUserState
    • LoginPlugin
    • PostLoginPlugin
    • PreLoginPlugin
    • UserAuthenticationPlugin
  • Softadmin.Api.Logout
    • LogoutPlugin
  • Softadmin.Api.Page
    • ICustomPage
    • PagePlugin
  • Softadmin.Api.Ui
    • IDebugWindow
    • IProgressWindow

Class PostLoginPlugin

A plugin that is executed when the user has logged in.

Inheritance
System.Object
Plugin
LoginPlugin
PostLoginPlugin
Inherited Members
LoginPlugin.ForwardState
LoginPlugin.QueryString
LoginPlugin.HttpHeaders
LoginPlugin.UserPrincipal
Plugin.RequestFactory
Plugin.SessionVariables
Plugin.SystemSettings
Plugin.Cookies
Plugin.Environment
Plugin.CreateObjRef(Type)
Namespace: Softadmin.Api.Login
Assembly: Softadmin.Api.dll
Syntax
public abstract class PostLoginPlugin : LoginPlugin
Remarks

Subclass this plugin and override AfterLogin() to for example log successful logins or to set extra session variables based on the logged in user.

Examples
public override void AfterLogin()
{
	int? companyId = this.CompanyInfoWebService.GetCompanyId(this.SessionVariables.Username);
	if (companyId.HasValue)
	{
		this.SessionVariables["CompanyId"] = companyId;
	}
}

Methods

AfterLogin()

Executes the plugin.

Declaration
public abstract void AfterLogin()
Remarks

Use UserId to get the id of the logged in user.

Exceptions
Type Condition
System.Exception

Any exception thrown by this method will be caught and logged but will not prevent the client from logging in.

See Also

PreLoginPlugin
In This Article
Back to top Generated by DocFX