Search code examples
oauthwso2identityfederation

Custom Federation for OAuth in WSO2


  1. To write custom federation , after generating jar using pom from wso2 docs , i put that in said folder . but how do use this custom federation , Documentation stops after this .

I cant see my new custom federation name in any drop down , i was expecting to see this in the list of federation drop down in Service Provider configuration

  1. If we write custom federation for Oauth IDP , all the urls configuration have to be programatically managed in OSGI bundle, we wont get UI for that ?

  2. Why is OAuth not supported if we have any other vendor apart from facebook and google, yahoo, which is not openid connect we cant use any out of the box SSO .


Solution

  • i got my Bundle loaded on to WSO2 these were the steps

    i started wso2 with osgi console

    $>wso2Server.bat -DosgiConsole After this server starts and if we hit enter we can get osgi prompt there we can type osgi commands try $> package org.abc.whateverpackage this will list all the bundles that import/export the given package name within the runtime.

    try to $install file:<filepath> this gives an error message saying something is missing in imnport or whatever issue might be im my case i started with pom from wso2 so i had to correct the configuration from org.wso2.carbon.identity.application.authentication.framework.*, to org.wso2.carbon.identity.application.authentication.framework.*;version="4.2.2"

    the number 4.2.2 i got from the dependencies in the pom

    i added BundleActivator

    <Bundle-Activator>com.osgi.customauth.Activator</Bundle-Activator>
    

    Now when i create an IDP i can see my custom Authenticator in the list along with google , yahoo etc

    But all the urls for OAUTH are in my code i have to programatically externalize this , i did not yet find a clean way to do this