Questions tagged [principal]

Use this tag for questions related to a principal programming principle.

For example:

In Python, a principal programming principle is the EAFP principle.

Read about principal in its general meaning in the Wiktionary.

159 questions
3
votes
1 answer

ASP.NET / IIS 7 - Authenticate against an Active Directory using a Principal

My current application uses the PrincipalContext class to authenticate a default user (filled in in the Web.config dedicated section) against a LDAP (and more precisely an Active Directory): ldapContext = new PrincipalContext(AdContextType, AdHost,…
Emmanuel
  • 12,525
  • 9
  • 44
  • 66
3
votes
2 answers

Custom principal in ASP.NET MVC

I want to be able to access custom properties for an authenticated user like UserId and FirstName without querying the database each time. I found this site through a post on Stack Overflow and I like the approach - but I use IoC / repositories and…
Mayo
  • 9,758
  • 6
  • 40
  • 89
3
votes
2 answers

WCF Service - Custom Principal

In the constructor of my WCF service class I am setting the current principal to be that of the principal passed in the header of the message: Thread.CurrentPrincipal =…
David Ward
  • 3,458
  • 9
  • 39
  • 63
3
votes
1 answer

MockMvc and User Principal

I try to test the access of mvcControllers injecting the UserPrincipal : restPockMockMvc .perform(get("/pocs").principal(authToken)) .andReturn(); and here's the method of the controller I try to…
3
votes
1 answer

How does IsInitiating working on a WCF contract?

From reading this I thought that a client can´t run a IsInitiating=false service method before a IsInitiating=true service method have been executed. But in our WCF service that are a singelton I can call the service methods as I like, there is no…
Banshee
  • 15,434
  • 36
  • 111
  • 198
3
votes
2 answers

How to show firstname of the user in grails with shiro

i am new to grails and trying to show the firstname of the user with: "shiro:principal property="firstName" but it gives me the following error: Error executing tag 'shiro:principal': No such property: firstName for class: java.lang.String If i…
user
  • 41
  • 2
3
votes
1 answer

constant term in Matlab principal component regression (pcr) analysis

I am trying to learn principal component regression (pcr) with Matlab. I use this guide here: http://www.mathworks.fr/help/stats/examples/partial-least-squares-regression-and-principal-components-regression.html it's really good, but I just cannot…
Matlabber
  • 143
  • 1
  • 2
  • 6
3
votes
3 answers

request.getUserPrincipal() is still not null after session is invalidated

I have web application deployed on websphere application server 7.0. User logins using /j_security_check. When session timeout occures session ivnvalidates but request.getUserPrincipal() is still not null. I expect it should be null. How to clean…
Vadim
  • 71
  • 1
  • 5
2
votes
2 answers

Correct Kerberos principal type for a hostbased service

There are several types of Kerberos principals. A regular user princpal like michael-o@COMPANY.COM would be KRB_NT_PRINCIPAL. But what about a service like HTTP/host.company.com@COMPANY.COM? There are a few possible types like…
Michael-O
  • 17,130
  • 6
  • 51
  • 108
2
votes
0 answers

How and where to update RolePrincipal?

I'm using asp.net FormAuthentication and a custom role manager. I would like to add a custom Identity to the User object so I can store some custom user data in the User object and still have all the roles functionality. I'm kind of confused as to…
chobo
  • 29,453
  • 35
  • 118
  • 182
2
votes
0 answers

SpringBoot Oauth2 when ignore url principal is null

When I ignore "/restaurants" @Override public void configure(WebSecurity web) { web.ignoring().antMatchers("/restaurants"); } Principal on microservice is null but I need it becouse I use for example @RequestParam "my" it shows only owner…
Arczi
  • 101
  • 5
2
votes
1 answer

Custom principal objects vs Membership API in ASP.NET?

I'm trying to get a handle on all the various techniques of implementing custom authorization within a traditional ASP.NET application - it seems that the preferred approach is to use the Membership API by creating a custom provider model. I'm…
manning18
  • 897
  • 3
  • 8
  • 18
2
votes
1 answer

Fundamental difference between Generic Principal and Forms Authentication in context of ASP.NET?

What exactly is the difference between Forms Authentication and Generic Principal? If I use Forms Authentication in ASP.NET, what advantage would I have by implementing the Generic Principal as well as Generic Identity over not implementing these?…
2
votes
1 answer

Extract data from Principal in Java Spring Boot

I try extract data from Principal. principal How to do it? I need the login value from 'attributes' Collection. principal doesn't have such methods.
Karol
  • 63
  • 8
2
votes
1 answer

Problem using custom principal and identity with WCF services

We are using a custom principal and identity type (ProdigyPrincipal/ProdigyIdentity) because we need extra information within our programs and services. In the program we set the principal and identity. When communicating with a WCF service the…
Hans Leeuw
  • 31
  • 1
  • 3
1 2
3
10 11