final case class AuthContext(userId: String, user: AbstractUser = AbstractUser.Anonymous, perms: List[String] = Nil, correlationId: Option[String] = None, headers: Map[String, String] = Map.empty, info: JsonObject = JsonObject.empty) extends Product with Serializable
This object allows to manage an AuthContext inside the call in Elasticsearch. It can be used to monitor rest calls, API integration patterns, better logging.
- userId
the id of the user
- perms
the permission of the user
- correlationId
the correlationID of the call
- headers
some headers useful to pass information
- info
extra json ino to export for logs
- Alphabetic
- By Inheritance
- AuthContext
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
AuthContext(userId: String, user: AbstractUser = AbstractUser.Anonymous, perms: List[String] = Nil, correlationId: Option[String] = None, headers: Map[String, String] = Map.empty, info: JsonObject = JsonObject.empty)
- userId
the id of the user
- perms
the permission of the user
- correlationId
the correlationID of the call
- headers
some headers useful to pass information
- info
extra json ino to export for logs
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val correlationId: Option[String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getMapInfo: Map[String, String]
- def getProperty[T](name: String, default: T)(implicit decoder: Decoder[T]): Either[FrameworkException, T]
-
def
getProperty[T](name: String)(implicit decoder: Decoder[T]): Either[FrameworkException, T]
Get a property object from an user
Get a property object from an user
- T
Type of the property
- name
name of the property
- decoder
decoder of the property type
- returns
a Property or an Exception
- val headers: Map[String, String]
- val info: JsonObject
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val perms: List[String]
-
def
setProperty[T](name: String, property: T)(implicit encoder: Encoder[T]): AuthContext
Add a new property object to an user
Add a new property object to an user
- T
Type of the property
- name
name of the property
- property
a property object to add
- encoder
encoder of the property type
- returns
the user
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def systemNoSQLContext(index: String): AuthContext
- def systemNoSQLContext(): AuthContext
- val user: AbstractUser
- val userId: String
- def userNoSQLContext(index: String)(implicit user: AbstractUser): AuthContext
- def userNoSQLContext(implicit user: AbstractUser): AuthContext
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()