Search in sources :

Example 1 with RequiresGuest

use of org.apache.shiro.authz.annotation.RequiresGuest in project graylog2-server by Graylog2.

the class AuthServiceBackendsResource method getActiveType.

@GET
@RequiresGuest
@Path("active-backend/type")
@ApiOperation("Returns type of currently active authentication service backend")
public Response getActiveType() {
    String type = null;
    final AuthServiceBackendDTO activeBackendConfig = globalAuthServiceConfig.getActiveBackendConfig().orElse(null);
    if (activeBackendConfig != null) {
        type = activeBackendConfig.config().type();
    }
    return toResponse(type);
}
Also used : AuthServiceBackendDTO(org.graylog.security.authservice.AuthServiceBackendDTO) Path(javax.ws.rs.Path) RequiresGuest(org.apache.shiro.authz.annotation.RequiresGuest) GET(javax.ws.rs.GET) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

ApiOperation (io.swagger.annotations.ApiOperation)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1 RequiresGuest (org.apache.shiro.authz.annotation.RequiresGuest)1 AuthServiceBackendDTO (org.graylog.security.authservice.AuthServiceBackendDTO)1