How to Login user According to role in yii? - roleprovider

I want to login user according to role, but i am not getting proper way.
How to access role based page in yii
so pl z. provide me code with example.
I am waiting Good response.

I have solved these question answer
click here
Thanks
hari maliya

Related

How can I set Keycloak user id as static?

I am using Keycloak for authentication.
I used the user id in the access token as a user identity and stored it in some tables when users did some actions. I have some counters relying on user-id.
But recently, I found that the Keycloak user id is dynamic and it is changed after some time(I am not sure how long a user-id is kept) that making my counters counted improperly.
So I wonder is there a way that we set the user id static? And how can I get the user email from the user-id that had been changed in the past?
I am really appreciated your help and suggestions. Thank you so much.
I am not 100 % sure about:
But recently, I found that the Keycloak user id is dynamic and it is
changed after some time( I am not sure how long a user-id is kept)
that making my counters counted improperly.
You can use the claim sub in combination with a public subject identifier types. Have a look a this answer for a more detailed explanation.
Answer: it was my mistake. I used two accounts with the same username and different email IDs. When I ran the query with username filter, it returned 2 user id. That's why I think the user id generated by Keycloak is dynamic.
Confirm again: the user-id is fixed.

Login/Registration through Database in CQ5 or AEM

I have a requirement to create Login/Registration/Forgot Password from Database itself in CQ5/AEM.
Login Page
Registration
User Activation
Approval Process
Landing Page after Login- How to configure on Dispatcher
Forgot Password.
7.It should work as User management in CQ5/AEM
I know its a big requirement but if someonr can give me idea to implement it would be big help for me.
Thanks in Advance

Using own user repository/ database table for IdentitiyServer3 to authenticate against

Can you please help me with some insight on using my own User repository/ database table for Identity server (IdentityServer3) to authenticate against?
I know other people have done it, but can’t seem to figure out how?
You need to write a user service. The docs and samples have very good coverage of that.
https://identityserver.github.io/Documentation/docs/advanced/userService.html

Returning authenticated user's data in REST

I'm new using REST api and I understood that OAuth 2.0 is a greate way to handle authentication security but: Is there a standard/best-practice to return only the authenticated user's datas ?
For example,
User 1 authenticated try to access (GET) the url .#/myBooks that doesn't give the same result as if the User 2 is logged in.
Is it possible using Firebase ?
What is the server guideline using Sails or Express on Nodejs ?
Any good tutorial (because I could not find any) would also be appreciate! ;-)
Many thanks...
You can secure your data in Firebase using its security rules. With the correct .read rules in place, a user can only see their own data.
Did you read this quick start? https://www.firebase.com/docs/security/quickstart.html
There is also a nice tool to simplify creating advanced security rules. I don't think you'll need it for the use-case you described, but it may come in handy later: https://github.com/firebase/blaze_compiler
Maybe this is what you're looking for? http://passportjs.org/

Sending SAML request to NetSuite

I've been navigating and toying with features of netsuite, for one feature that came across was the SAML single sign-on. I can not understand how it works or even get it working.
I've read the numerous SAML documents on suiteanswers however, they leave me puzzled.
Does anyone have a working netsuite SAML code example or documentation?
A hurl.it would suffice also!
Thanks is advance
I don't have a specific SAML snippet, but IIRC SSO needs to be enabled/provisioned. Kindly navigate to Setup, Company, View Billing Information. There must be users provisioned towards the bottom under: Two Factor Authentication Users (Should show Provisioned Quantity and Used Quantity.) I believe there is also a place on Role Permissions where a Role can be defined as single Sign On ONLY - but I don't think that is what you are asking.
Like I said, I have no snippet, however on the Suite-Answers Site, They give me a reference Link that has a PDF that shows a sample for you. The PDF Itself is Located here: https://system.netsuite.com/core/media/media.nl?id=7490306&c=NLCORP&h=cd5c1c4877483ebab26b&_xt=.pdf
I've made an offline http nonsecured version here stored in Dropbox: https://www.dropbox.com/s/ohiu6f308szu6rd/SAML_Setup_ADFS_Netsuite.pdf