BrightSide Workbench Full Report + Source Code
org.turro.alliance.auth.AllianceAuthentication Class Reference
Inheritance diagram for org.turro.alliance.auth.AllianceAuthentication:
Collaboration diagram for org.turro.alliance.auth.AllianceAuthentication:

Public Member Functions

boolean requiresProcedence ()
 
boolean accepts (Object extra)
 
IContact doLogin (String login, String pass, Object extra)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 43 of file AllianceAuthentication.java.

Member Function Documentation

◆ accepts()

boolean org.turro.alliance.auth.AllianceAuthentication.accepts ( Object  extra)

Implements org.turro.external.IElephantAuthentication.

Definition at line 51 of file AllianceAuthentication.java.

51  {
52  WsMember member = (WsMember) extra;
53  return (member != null) && (member.getService().equals(AxClient.CLIENT_SERVICE));
54  }
Here is the call graph for this function:

◆ doLogin()

IContact org.turro.alliance.auth.AllianceAuthentication.doLogin ( String  login,
String  pass,
Object  extra 
)

Implements org.turro.external.IElephantAuthentication.

Definition at line 57 of file AllianceAuthentication.java.

57  {
58  WsMember member = (WsMember) extra;
59  if(!Strings.isBlank(pass)) try {
60  AxContact contact = SqlClause.select("c").from("AxContact c")
61  .where().equal("c.contactId.memberId", member.getMemberId())
62  .and().equal("c.active", true)
63  .and().equal("c.email", login)
64  .and().equal("c.passdig", Digest.sha256(pass).hexString())
65  .dao(new AlliancePU())
66  .singleResult(AxContact.class);
67  if(contact != null) {
68  return new AllianceContact(contact);
69  }
70  } catch (NoSuchAlgorithmException ex) {
71  Logger.getLogger(AllianceAuthentication.class.getName()).log(Level.SEVERE, null, ex);
72  }
73  return null;
74  }
Here is the call graph for this function:

◆ requiresProcedence()

boolean org.turro.alliance.auth.AllianceAuthentication.requiresProcedence ( )

Implements org.turro.external.IElephantAuthentication.

Definition at line 46 of file AllianceAuthentication.java.

46  {
47  return !Clients.getMembers(AxClient.CLIENT_SERVICE).isEmpty();
48  }

The documentation for this class was generated from the following file: