From wiki.ginstr.com
Revision as of 12:30, 29 June 2016 by Mark (talk | contribs)
Jump to: navigation, search
Inherited classes
View
Android class type
LinearLayout
Child elements
TextView, Button, EditText, CheckBox,
Widget XML tag
<com.ginstr.widgets.GnDropDown>
Can use alternative layout (in controls folder) - widget_en_login.xml


GnLogin provides an interface for a user login. It is connected to ginstr SSO server and ginstr IW server. In order to authenticate with any ginstr app it’s necessary to have an account on both SSO and ginstr server. It also supports offline work mode. If there is no internet connection and there was a previously successful login, it will use the data from that login to authenticate itself. After a successful login the user can process to layout provided as target.

Hint
At present always use widget with gn:s_loginType=”ag” and gn:testMode=”true”

XML Attributes Description

Note: An attribute marked with asterisk (*) is a mandatory parameter when creating widget.

Attribute Description
gn:s_loginType* Sets login type
gn:testMode If present and set to true, then widget will authenticate against ginstr test servers. If set to false, it will authenticate against production servers. Keep in mind when testing and deploying
gn:act_toLayoutLogin Special action used only on login widget to open another layout after successful login

Validation

GnLogin username field gets validated for valid email entry.

Valid formats of entry are:

  • myemail@yahoo.com
  • myemail-100@yahoo.com
  • myemail.100@yahoo.com
  • myemail111@somedomain.com
  • myemail-100@somedomain.net
  • myemail.100@somedomain.com.au
  • myemail@1.com
  • myemail@gmail.com.com
  • myemail+100@gmail.com
  • myemail-100@yahoo-test.com

gn:s_loginType

Sets login type

(String) values = ag, sso

Value Description
ag Authenticates user with SSO first and then requires ginstr server authentication. Login is valid only if authentication is successful on both SSO and ginstr server
sso Authenticates user with SSO server. Login is valid if SSO server authentication is successful

gn:testMode

If present and set to true, then widget will authenticate against ginstr test servers. If set to false, it will authenticate against production servers.

Keep in mind when testing and deploying

gn:act_toLayoutLogin

Special action used only on login widget to open another layout after successful login

(String) values = @+id/layoutId, alias (of layout)