dotnet-cas-client icon indicating copy to clipboard operation
dotnet-cas-client copied to clipboard

get user attributes

Open MostafaMahdy opened this issue 2 years ago • 6 comments

i use cas10 on my mvc application & want to get user attributes after successful login but no attributes returns

MostafaMahdy avatar Jun 05 '22 08:06 MostafaMahdy

@MostafaMahdy Unfortunately the CAS v1.0 specification does not support user attributes. It only supports providing the asserted identity of the user who logged in. See the specification details for more information: https://apereo.github.io/cas/6.5.x/protocol/CAS-Protocol-Specification.html#242-response

If you need user attributes, please use CAS v3.0 (cas30) or SAML v1.1 (saml11). The CAS server you are using must support attribute release. It is possible to still use CAS v3.0 or SAML v1.1 but not have any attributes in the service ticket because your server does not release any attributes for your application. Check with your identity provider to make sure this isn't the case.

CAS - Enterprise Single Sign-On for the Web

TheHokieCoder avatar Jun 05 '22 12:06 TheHokieCoder

i tried to set ticketValidatorName="Cas30" but i get this message "Could not find ticket validatory type Cas30", how to use cas30 on my application please?!

MostafaMahdy avatar Jun 06 '22 06:06 MostafaMahdy

My apologies, @MostafaMahdy. It's been quite a while since I've worked with this project, so I forgot that CAS v3 support is currently only experimental and not yet merged into the main branch. Please check out issue #108 for further details. It would actually be a big help if you were able to test out the experimental CAS v3 implementation.

Does your identity provider support SAML v1.1? If so, give that a try to see if you are able to get the attributes that you need.

TheHokieCoder avatar Jun 06 '22 14:06 TheHokieCoder

my identity provider support SAML v1.1 & i get the attributes but it does not redirect after login to my service it keeps on login page contains user attributes

MostafaMahdy87 avatar Jun 07 '22 08:06 MostafaMahdy87

@MostafaMahdy Would you please provide what you have configured for your casClientConfig section of your web.config file? Before posting that section here, though, please scrub any sensitive details about your CAS server. We don't need to know the exact URL of your CAS server endpoints.

TheHokieCoder avatar Jun 08 '22 12:06 TheHokieCoder

config.txt that is my config

MostafaMahdy avatar Jun 09 '22 06:06 MostafaMahdy