models

package
v0.1.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor added in v0.1.14

type Cursor struct {
	Prev string `json:"prev"`
	Next string `json:"next"`
}

Cursor is used for pagination

type Error added in v0.1.12

type Error struct {
	Message string `json:"message"`
	Field   string `json:"field,omitempty"`
}

Error is a basic structure for all errors coming out of the api

type ISClaims

type ISClaims struct {
	*jwt.StandardClaims
	// jwt.StandardClaims
	ClientID string `json:"client_id,omitempty"`
	// Subject is also the user Id
	AuthorizedTime       int      `json:"auth_time,omitempty"`
	IdentityProvider     string   `json:"idp,omitempty"`
	SecurityStamp        string   `json:"AspNet.Identity.SecurityStamp,omitempty"`
	Role                 []string `json:"role"`
	PreferredUsername    string   `json:"preferred_username,omitempty"`
	Name                 string   `json:"name,omitempty"`
	Email                string   `json:"email,omitempty"`
	EmailVerified        bool     `json:"email_verified,omitempty"`
	Phone                string   `json:"phone_number,omitempty"`
	PhoneVerified        bool     `json:"phone_number_verified,omitempty"`
	Scope                []string `json:"scope,omitempty"`
	AuthenticationMethod []string `json:"amr,omitempty"`
	SchoolID             string   `json:"school_id,omitempty"`
}

ISClaims is the basic structure of a jwt from identityserver4

type Metadata

type Metadata struct {
	Message string  `json:"message"`
	Errors  []Error `json:"errors"`
	Success bool    `json:"success"`
	Cursor  Cursor  `json:"cursor"`
}

Metadata is basic data about the data being returned from the api

type NatsData

type NatsData struct {
	Data     interface{} `json:"data"`
	Metadata *Metadata   `json:"metadata"`
}

NatsData is a child to NatsResponse that holds the data and metadata

type NatsResponse

type NatsResponse struct {
	Status int `json:"status"`
	*NatsData
}

NatsResponse is the parent response

type RolesRequest

type RolesRequest struct {
	Roles       []string `json:"roles"`
	RequestorID string   `json:"requestorId"`
}

RolesRequest is used in the request to the identity server for authorization

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL