Coder Social home page Coder Social logo

sso's Introduction


SAML Configuration Steps

1.Include ZohoSAML.jar

2.Add the following filter Mapping. This works as an authentication filter for your app

<filter>
	<filter-name>SAMLFILTER</filter-name>
	<filter-class>com.zoho.saml.Samlfilter</filter-class>
	<init-param>
		<param-name>excludePattern</param-name>
		<param-value>\/zoho\/(requestSAML|consumeSAML|logout)</param-value>
	</init-param>
</filter>
<filter-mapping>
	<filter-name>SAMLFILTER</filter-name>
	<url-pattern>*.do</url-pattern>
</filter-mapping>

3.Add the following Servlet mapping (SAML Endpoints - Request,Consume,Logout)

<servlet>
	<servlet-name>samlRequest</servlet-name>
	<servlet-class>com.zoho.saml.RequestSAML</servlet-class>
</servlet>
<servlet-mapping>
	<servlet-name>samlRequest</servlet-name>
	<url-pattern>/zoho/requestSAML</url-pattern>
</servlet-mapping>

<servlet>
	<servlet-name>samlResponse</servlet-name>
	<servlet-class>com.zoho.saml.ConsumeSAML</servlet-class>
</servlet>
<servlet-mapping>
	<servlet-name>samlResponse</servlet-name>
	<url-pattern>/zoho/consumeSAML</url-pattern>
</servlet-mapping>		

<servlet>
	<servlet-name>samlLogout</servlet-name>
	<servlet-class>com.zoho.saml.LogoutSAML</servlet-class>
</servlet>
<servlet-mapping>
	<servlet-name>samlLogout</servlet-name>
	<url-pattern>/zoho/logout</url-pattern>
</servlet-mapping>		 

4.For All URL's Passing through SamlFilter CurrentUserObject can be obtained using the following Code Snippet

User user=SamlUtil.getCurrentUser();

OAuth2 Configuration Steps

1.Include ZohoOAuth.jar

2.Add the following Servlet mapping (Request OAuth) and configure dispatchTo init param if u need to obtain OAuth tokens in request attribute (Name : OAUTH_PARAMS)

<servlet>
	<servlet-name>requestOAuth</servlet-name>
	<servlet-class>com.zoho.oauth.OAuth</servlet-class>
    <init-param>
    	<param-name>dispatchTo</param-name>
    	<param-value>/jsp/OAuth.jsp</param-value>
    </init-param>
	<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
	<servlet-name>requestOAuth</servlet-name>
	<url-pattern>/zoho/requestOAuth</url-pattern>
</servlet-mapping>

3.Implement PersistenceHandler method if u need to persist OAuth data and specify the classpath in PERSISTENCE_HANLDER Key under OAUTHConfig.properties file.

4.To generate a new ClientID and ClientSecret go to https://accounts.zoho.com/developerconsole and click on to "Add Client ID"

5.Update the newly generated ClientID and ClientSecret in OAUTHConfig.properties file

5.set ACCESS_TYPE property to offline to generate both Access and refresh token.

sso's People

Contributors

naresh28babu avatar zoho-platform avatar

Watchers

James Cloos avatar Bhadresh Shiroya 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.