Questions tagged [security-context]
104 questions
1
vote
1 answer
ExecutorService with SecurityContextHolder
I am changing single thread to multi thread execution of the method by using ExecutorService.
it's calling SecurityContextHolder inside, which throwing exception:
Caused by: java.lang.Exception: Authentication object not found in security context.
…

Hitesh Kumar
- 512
- 1
- 8
- 27
1
vote
1 answer
Spring Boot register a filter after spring security filter is executed
I have defined 2 filters which should run on every request, but only after SecurityContextHolder's context is set by spring boot.
However, i always get SecurityContextHolder.getContext().getAuthentication() as null.
Here is my filter…

Aseem Goyal
- 2,683
- 3
- 31
- 48
1
vote
1 answer
Error No primary or default constructor found for interface javax.ws.rs.core.SecurityContext
I have problem with SecurityContext from javax.ws.rs.
In my controller I inject SecurityContext with annotation @Context.
@RequestMapping(value = "/movie/search")
public String getMovies(@RequestParam(name = "search") String search, Model model,…

Dino
- 121
- 5
1
vote
0 answers
JAX-WS how to inject SecurityContext outside endpoint
I am having problems with jax-ws to inject the SecurityContext. Follow an example below:
@JWTTokenNeeded
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@Path("/list")
public String list(PublishProductsRequest…

Vitor Lima
- 11
- 1
1
vote
3 answers
CreateProcessAsUser not setting the user correctly
Calling a GUI app using
[DllImport(
"advapi32.dll",
EntryPoint = "CreateProcessAsUser",
SetLastError = true,
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
private static extern bool CreateProcessAsUser(
…

Jader Dias
- 88,211
- 155
- 421
- 625
1
vote
1 answer
Using Dropwizard Authentication manual
I'm currently using http://www.dropwizard.io/1.1.0/docs/manual/auth.html# Dropwizard-Authentication in my Application. But i like to do the authentication "manualy" which means from a specific login/logout API call on a not authenticated REST…

IEE1394
- 1,181
- 13
- 33
1
vote
1 answer
How to authenticate and create session programmatically in security context
Hi i have an application that uses its own implementation for user to authenticate ,by saving a User pojo in the HttpSession and invalidating that HttpSession Object when the session is done, but what i want to do is to use the security context to…

achabahe
- 2,445
- 1
- 12
- 21
1
vote
0 answers
How to get SecurityContext for not current user?
I couldn't find an answer for that.
I'm aware that I can get SecurityContext for currently logged user with
SecurityContextHolder.getContext()
but I would like to get that context for not curretnly logged one. Not sure what more information I can…

lukaszrys
- 1,656
- 4
- 19
- 33
1
vote
0 answers
Jersey SecurityContext for what is it good, and how to use it?
I have an API like this
@GET
@Path("/tasks")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "List all tasks", notes = "", response = Tasks.class, authorizations =…

Gobliins
- 3,848
- 16
- 67
- 122
1
vote
1 answer
Get all roles for the current user
Once I have a principal logged in, how can I obtain all roles for a user?
I'm creating a Java EE 6 application, and I'm writing a JAX-RS service to return all the roles for the current user, which will be consumed by a front-end to properly render…

Bruno Brant
- 8,226
- 7
- 45
- 90
1
vote
1 answer
Avoiding using security.context inside a form with Symfony
For each article a list of comment is displayed. I want users to be able to Edit theirs own comments (and only THEIR own comments). I wanted to know if it was OK to use methode 2 or if there was a break of security?
METHODE 1
So far I use the…

Alexis_D
- 1,908
- 3
- 16
- 35
1
vote
3 answers
Service not able to access a mapped drive
I have read in many forums that mapped drives are not accessible from a service as no user is logged on.
Question 1) I tried making my service as a log on - as some account and i had my network drive mapped in that very account. The service still…

Rohit
- 11
- 1
- 2
1
vote
2 answers
Symfony Service Configurator: getToken with security.context is NULL
I'm using Symfony Service Configurator in my project to configure a service after its instantiation (Docs),
in Configure method I need the current user logged so I inject the container and I tried to get the token form Security.context service but…

sadok-f
- 1,387
- 15
- 28
1
vote
1 answer
Spring Security: jdbc-user-query, PreparedStatementCallback
I got a problem with my query but I don't know what has caused it so I need your help =)
I got the following exception:
PreparedStatementCallback; bad SQL grammar [select USERNAME as username, PASSWORD as password, from ams.user where USERNAME=?];…

James Carter
- 849
- 3
- 13
- 29
1
vote
1 answer
Sharing security context across multiple glassfish servers
My application is distributed in multiple components (Web Applications).
The components are deployed on different glassfish servers.
Each Glassfish server is running on a different host.
I'm using the provided Security Realm for authentication.
Is…

Matthias
- 313
- 1
- 8