Hi Viveknand,

Last time then I experienmenting with MongoDB as service registrry, I need 
to:

-  change all the *@ to _*, 
- also *id* need to be *_id*. 
- And all the number becomes NumberLong(xxxx)

Something like this should work (tested on 5.3.x):
==================================================================
{
    "_id" : NumberLong(1001),
    "_class" : 
"org.apereo.cas.support.oauth.services.OAuthRegisteredService",
    "clientId" : "awesomeoauth",
    "clientSecret" : "secr3t",
    "serviceId" : "^https://www.example.com/oauth/.*";,
    "name" : "awesomeservice",
    "evaluationOrder" : NumberLong(1001),
    "supportedResponseTypes" : [ 
        "java.util.HashSet", 
        [ 
            "code"
        ]
    ],
    "supportedGrantTypes" : [ 
        "java.util.HashSet", 
        [ 
            "authorization_code", 
            "refresh_token"
        ]
    ]
}

==================================================================
As for why that is no documentation, I am also not sure...

I think I read somewhere on this forum that the MongoDB service registry is 
intended to be used by the CAS management, and not updated by hand. That 
might be why no official documentation about how to update the MongoDB 
service registry manually.

See if other can give you more info on how to properly use MongoDB as 
service registry. 

Cheers!
- Andy


On Monday, 20 August 2018 23:14:37 UTC+8, vivekanand yaram wrote:
>
> Hello All,
>
>  
>
> Good morning !  I’m working on a POC to use CAS with our application . So 
> far the POC is going good and I could see that CAS matching all our 
> requirements . We are using mongo database with our application , so would 
> like to continue the same databased with CAS too , but while loading CAS 
> Service registry from the mongo db. , I’m facing an issue. I think the 
> mongo db document with service information is wrong , I couldn’t find 
> proper document information anywhere , hence I was using same as json 
> service registry document . Please help me with the proper document to read 
> service registry from mongo db.
>
>  
>
> here is the mongo db document entry I was using 
>
>  
>
> {
>
>     "@class" : "org.apereo.cas.services.RegexRegisteredService",
>
>     "serviceId" : "^http://localhost:6441/cas-management";,
>
>     "name" : "CAS App",
>
>     "description": "This is to manage CAS ",
>
>     "id" : 19991,
>
>     "evaluationOrder" : 1
>
> }
>
>  
>
>  
>
> Please help . Early response would be appreciated J 
>
>  
>
> Regards,
> Vivekanand.  .
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/47a6ae64-45e3-42a6-b2f5-13bb92fe1381%40apereo.org.

Reply via email to