mirror of
https://github.com/kataras/iris.git
synced 2026-01-22 11:25:59 +00:00
more features and fix database/mysql:jwt example
This commit is contained in:
@@ -1343,6 +1343,7 @@ func (ctx *Context) GetContentType() string {
|
||||
// trim-ed(without the charset and priority values)
|
||||
// header value of "Content-Type".
|
||||
func (ctx *Context) GetContentTypeRequested() string {
|
||||
// could use mime.ParseMediaType too.
|
||||
return TrimHeaderValue(ctx.GetHeader(ContentTypeHeaderKey))
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ type SimpleUser struct {
|
||||
AuthorizedAt time.Time `json:"authorized_at,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
Username string `json:"username,omitempty"`
|
||||
Password string `json:"-"`
|
||||
Password string `json:"password,omitempty"`
|
||||
Email string `json:"email,omitempty"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
Token json.RawMessage `json:"token,omitempty"`
|
||||
@@ -339,16 +339,16 @@ type (
|
||||
// may or may not complete the whole User interface.
|
||||
// See Context.SetUser.
|
||||
UserPartial struct {
|
||||
Raw interface{}
|
||||
userGetAuthorization
|
||||
userGetAuthorizedAt
|
||||
userGetID
|
||||
UserGetUsername
|
||||
UserGetPassword
|
||||
userGetEmail
|
||||
userGetRoles
|
||||
userGetToken
|
||||
userGetField
|
||||
Raw interface{} `json:"raw"`
|
||||
userGetAuthorization `json:",omitempty"`
|
||||
userGetAuthorizedAt `json:",omitempty"`
|
||||
userGetID `json:",omitempty"`
|
||||
UserGetUsername `json:",omitempty"`
|
||||
UserGetPassword `json:",omitempty"`
|
||||
userGetEmail `json:",omitempty"`
|
||||
userGetRoles `json:",omitempty"`
|
||||
userGetToken `json:",omitempty"`
|
||||
userGetField `json:",omitempty"`
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user