fr.paris.lutece.plugins.mylutece.modules.oauth.authentication
Class OAuthAuthentication

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication
      extended by fr.paris.lutece.plugins.mylutece.modules.oauth.authentication.OAuthAuthentication
All Implemented Interfaces:
fr.paris.lutece.portal.service.security.LuteceAuthentication

public class OAuthAuthentication
extends fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication

OAuthAuthentication. (version 1.0a).
Uses httpAccess.* properties to perform HTTP requests.

See Also:
oauth.net

Constructor Summary
OAuthAuthentication()
           
 
Method Summary
 String getAccessTokenEndpointUrl()
          The access token url
 fr.paris.lutece.portal.service.security.LuteceUser getAnonymousUser()
          
 String getAuthorizeWebsiteUrl()
          Gets The authorize/authenticate url
 String getAuthServiceName()
          
 String getAuthType(javax.servlet.http.HttpServletRequest request)
          
 String getConsumerKey()
          Returns the consumer key
 String getConsumerSecret()
          Returns the consumer secret
 String getCredentialFormat()
          Gets the credentials format
 String getCredentialUrl()
          credential url
 String getIconUrl()
          
 String getName()
          
 String getPluginName()
          
 String getRequestTokenEndpointUrl()
          The request token url
 OAuthUser getUser(javax.servlet.http.HttpServletRequest request)
          Gets the user
 boolean isDelegatedAuthentication()
          
 boolean isUserInRole(fr.paris.lutece.portal.service.security.LuteceUser user, javax.servlet.http.HttpServletRequest request, String strRole)
          
 fr.paris.lutece.portal.service.security.LuteceUser login(String strUserName, String strUserPassword, javax.servlet.http.HttpServletRequest request)
          
 void logout(fr.paris.lutece.portal.service.security.LuteceUser user)
          
 void setAccessTokenEndpointUrl(String strAccessTokenEndpointUrl)
          Access token url
 void setAuthorizeWebsiteUrl(String strAuthorizeWebsiteUrl)
          The authorize/authenticate url
 void setAuthServiceName(String strAuthServiceName)
          Sets the auth service name
 void setConsumerKey(String strConsumerKey)
          Sets the consumer key
 void setConsumerSecret(String strConsumerSecret)
          Consumer secret
 void setCredentialFormat(String strCredentialFormat)
          Credentials format
 void setCredentialUrl(String strCredentialUrl)
          Set the credential url
 void setIconUrl(String strIconUrl)
          Sets the icon url
 void setName(String strName)
          Set the name
 void setRequestTokenEndpointUrl(String strRequestTokenEndpointUrl)
          The request token url
 String toString()
          
 
Methods inherited from class fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication
findResetPassword, getAccessControledTemplate, getAccessDeniedTemplate, getDoLoginUrl, getDoLogoutUrl, getHttpAuthenticatedUser, getLoginPageUrl, getLostLoginPageUrl, getLostPasswordPageUrl, getNewAccountPageUrl, getResetPasswordPageUrl, getRolesByUser, getUser, getUsers, getViewAccountPageUrl, isExternalAuthentication, isMultiAuthenticationSupported, isUsersListAvailable, updateDateLastLogin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OAuthAuthentication

public OAuthAuthentication()
Method Detail

getAnonymousUser

public fr.paris.lutece.portal.service.security.LuteceUser getAnonymousUser()


getAuthServiceName

public String getAuthServiceName()


getAuthType

public String getAuthType(javax.servlet.http.HttpServletRequest request)


getIconUrl

public String getIconUrl()

Specified by:
getIconUrl in interface fr.paris.lutece.portal.service.security.LuteceAuthentication
Overrides:
getIconUrl in class fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication

getName

public String getName()


getPluginName

public String getPluginName()


isUserInRole

public boolean isUserInRole(fr.paris.lutece.portal.service.security.LuteceUser user,
                            javax.servlet.http.HttpServletRequest request,
                            String strRole)


isDelegatedAuthentication

public boolean isDelegatedAuthentication()

Specified by:
isDelegatedAuthentication in interface fr.paris.lutece.portal.service.security.LuteceAuthentication
Overrides:
isDelegatedAuthentication in class fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication

login

public fr.paris.lutece.portal.service.security.LuteceUser login(String strUserName,
                                                                String strUserPassword,
                                                                javax.servlet.http.HttpServletRequest request)
                                                         throws LoginException,
                                                                fr.paris.lutece.portal.service.security.LoginRedirectException

Throws:
LoginException
fr.paris.lutece.portal.service.security.LoginRedirectException

getUser

public OAuthUser getUser(javax.servlet.http.HttpServletRequest request)
Gets the user

Parameters:
request - the reuqest
Returns:
the user found.

logout

public void logout(fr.paris.lutece.portal.service.security.LuteceUser user)


setAuthServiceName

public void setAuthServiceName(String strAuthServiceName)
Sets the auth service name

Parameters:
strAuthServiceName - the service name

setName

public void setName(String strName)
Set the name

Parameters:
strName - the service key

setIconUrl

public void setIconUrl(String strIconUrl)
Sets the icon url

Parameters:
strIconUrl - icon url

getRequestTokenEndpointUrl

public String getRequestTokenEndpointUrl()
The request token url

Returns:
the request token url

setRequestTokenEndpointUrl

public void setRequestTokenEndpointUrl(String strRequestTokenEndpointUrl)
The request token url

Parameters:
strRequestTokenEndpointUrl - the request token url

getAccessTokenEndpointUrl

public String getAccessTokenEndpointUrl()
The access token url

Returns:
the access token url

setAccessTokenEndpointUrl

public void setAccessTokenEndpointUrl(String strAccessTokenEndpointUrl)
Access token url

Parameters:
strAccessTokenEndpointUrl - the access token url

getAuthorizeWebsiteUrl

public String getAuthorizeWebsiteUrl()
Gets The authorize/authenticate url

Returns:
The authorize/authenticate url

setAuthorizeWebsiteUrl

public void setAuthorizeWebsiteUrl(String strAuthorizeWebsiteUrl)
The authorize/authenticate url

Parameters:
strAuthorizeWebsiteUrl - the authorize url

getConsumerKey

public String getConsumerKey()
Returns the consumer key

Returns:
the consumer key

setConsumerKey

public void setConsumerKey(String strConsumerKey)
Sets the consumer key

Parameters:
strConsumerKey - the consumer key

getConsumerSecret

public String getConsumerSecret()
Returns the consumer secret

Returns:
consumer secret

setConsumerSecret

public void setConsumerSecret(String strConsumerSecret)
Consumer secret

Parameters:
strConsumerSecret - consumer secret

toString

public String toString()

Overrides:
toString in class fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication

getCredentialUrl

public String getCredentialUrl()
credential url

Returns:
credential url

setCredentialUrl

public void setCredentialUrl(String strCredentialUrl)
Set the credential url

Parameters:
strCredentialUrl - credential url

getCredentialFormat

public String getCredentialFormat()
Gets the credentials format

Returns:
format

setCredentialFormat

public void setCredentialFormat(String strCredentialFormat)
Credentials format

Parameters:
strCredentialFormat - strCredentialFormat


Copyright © 2013 Mairie de Paris. All Rights Reserved.