adminschema

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2016 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Dex Admin API

The Dex Admin API.

Version: v1

Models

Admin
{
    email: string,
    id: string,
    password: string
}
Client
{
    clientName: string // OPTIONAL. Name of the Client to be presented to the End-User. If desired, representation of this Claim in different languages and scripts is represented as described in Section 2.1 ( Metadata Languages and Scripts ) .,
    clientURI: string // OPTIONAL. URL of the home page of the Client. The value of this field MUST point to a valid Web page. If present, the server SHOULD display this URL to the End-User in a followable fashion. If desired, representation of this Claim in different languages and scripts is represented as described in Section 2.1 ( Metadata Languages and Scripts ) .,
    id: string // The client ID. Ignored in client create requests.,
    isAdmin: boolean,
    logoURI: string // OPTIONAL. URL that references a logo for the Client application. If present, the server SHOULD display this image to the End-User during approval. The value of this field MUST point to a valid image file. If desired, representation of this Claim in different languages and scripts is represented as described in Section 2.1 ( Metadata Languages and Scripts ) .,
    redirectURIs: [
        string
    ],
    secret: string
}
ClientCreateRequest

A request to register a client with dex.

{
    client: Client
}
ClientCreateResponse

Upon successful registration, an ID and secret is assigned to the client.

{
    client: Client
}
State
{
    AdminUserCreated: boolean
}

Paths

POST /admin

Summary

Create Admin

Description

Create a new admin user.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | | body | | Yes | Admin |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | Admin | | default | Unexpected error | |

GET /admin/{id}

Summary

Get Admin

Description

Retrieve information about an admin user.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | id | path | | Yes | string |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | Admin | | default | Unexpected error | |

POST /client

Summary

Create Client

Description

Register an OpenID Connect client.

Parameters

|Name|Located in|Description|Required|Type| |:-----|:-----|:-----|:-----|:-----| | | body | | Yes | ClientCreateRequest |

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | ClientCreateResponse | | default | Unexpected error | |

GET /state

Summary

Get State

Description

Get the state of the Dex DB

Responses

|Code|Description|Type| |:-----|:-----|:-----| | 200 | | State | | default | Unexpected error | |

Documentation

Overview

Package adminschema provides access to the Dex Admin API.

See http://github.com/coreos/dex

Usage example:

import "google.golang.org/api/adminschema/v1"
...
adminschemaService, err := adminschema.New(oauthHttpClient)

Index

Constants

View Source
const DiscoveryJSON = `` /* 6028-byte string literal not displayed */

This file is automatically generated by schema/generator

**** DO NOT EDIT ****

Variables

View Source
var (
	ErrorNoRedirectURI      = errors.New("No Redirect URIs")
	ErrorInvalidRedirectURI = errors.New("Invalid Redirect URI")
	ErrorInvalidLogoURI     = errors.New("Invalid Logo URI")
	ErrorInvalidClientURI   = errors.New("Invalid Client URI")
)

Functions

func MapSchemaClientToClient added in v0.4.0

func MapSchemaClientToClient(sc Client) (client.Client, error)

Types

type Admin

type Admin struct {
	Email string `json:"email,omitempty"`

	Id string `json:"id,omitempty"`

	Password string `json:"password,omitempty"`
}

type AdminCreateCall

type AdminCreateCall struct {
	// contains filtered or unexported fields
}

func (*AdminCreateCall) Do

func (c *AdminCreateCall) Do() (*Admin, error)

func (*AdminCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type AdminGetCall

type AdminGetCall struct {
	// contains filtered or unexported fields
}

func (*AdminGetCall) Do

func (c *AdminGetCall) Do() (*Admin, error)

func (*AdminGetCall) Fields

func (c *AdminGetCall) Fields(s ...googleapi.Field) *AdminGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type AdminService

type AdminService struct {
	// contains filtered or unexported fields
}

func NewAdminService

func NewAdminService(s *Service) *AdminService

func (*AdminService) Create

func (r *AdminService) Create(admin *Admin) *AdminCreateCall

Create: Create a new admin user.

func (*AdminService) Get

func (r *AdminService) Get(id string) *AdminGetCall

Get: Retrieve information about an admin user.

type Client added in v0.4.0

type Client struct {
	// ClientName: OPTIONAL. Name of the Client to be presented to the
	// End-User. If desired, representation of this Claim in different
	// languages and scripts is represented as described in Section 2.1 (
	// Metadata Languages and Scripts ) .
	ClientName string `json:"clientName,omitempty"`

	// ClientURI: OPTIONAL. URL of the home page of the Client. The value of
	// this field MUST point to a valid Web page. If present, the server
	// SHOULD display this URL to the End-User in a followable fashion. If
	// desired, representation of this Claim in different languages and
	// scripts is represented as described in Section 2.1 ( Metadata
	// Languages and Scripts ) .
	ClientURI string `json:"clientURI,omitempty"`

	// Id: The client ID. Ignored in client create requests.
	Id string `json:"id,omitempty"`

	IsAdmin bool `json:"isAdmin,omitempty"`

	// LogoURI: OPTIONAL. URL that references a logo for the Client
	// application. If present, the server SHOULD display this image to the
	// End-User during approval. The value of this field MUST point to a
	// valid image file. If desired, representation of this Claim in
	// different languages and scripts is represented as described in
	// Section 2.1 ( Metadata Languages and Scripts ) .
	LogoURI string `json:"logoURI,omitempty"`

	// RedirectURIs: REQUIRED. Array of Redirection URI values used by the
	// Client. One of these registered Redirection URI values MUST exactly
	// match the redirect_uri parameter value used in each Authorization
	// Request, with the matching performed as described in Section 6.2.1 of
	// [RFC3986] ( Berners-Lee, T., Fielding, R., and L. Masinter,
	// “Uniform Resource Identifier (URI): Generic Syntax,” January
	// 2005. ) (Simple String Comparison).
	RedirectURIs []string `json:"redirectURIs,omitempty"`

	Secret string `json:"secret,omitempty"`
}

func MapClientToSchemaClient added in v0.4.0

func MapClientToSchemaClient(c client.Client) Client

type ClientCreateCall added in v0.4.0

type ClientCreateCall struct {
	// contains filtered or unexported fields
}

func (*ClientCreateCall) Do added in v0.4.0

func (*ClientCreateCall) Fields added in v0.4.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ClientCreateRequest added in v0.4.0

type ClientCreateRequest struct {
	Client *Client `json:"client,omitempty"`
}

type ClientCreateResponse added in v0.4.0

type ClientCreateResponse struct {
	Client *Client `json:"client,omitempty"`
}

type ClientService added in v0.4.0

type ClientService struct {
	// contains filtered or unexported fields
}

func NewClientService added in v0.4.0

func NewClientService(s *Service) *ClientService

func (*ClientService) Create added in v0.4.0

func (r *ClientService) Create(clientcreaterequest *ClientCreateRequest) *ClientCreateCall

Create: Register an OpenID Connect client.

type Service

type Service struct {
	BasePath string // API endpoint base URL

	Admin *AdminService

	Client *ClientService

	State *StateService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

func NewWithBasePath

func NewWithBasePath(client *http.Client, basePath string) (*Service, error)

type State

type State struct {
	AdminUserCreated bool `json:"AdminUserCreated,omitempty"`
}

type StateGetCall

type StateGetCall struct {
	// contains filtered or unexported fields
}

func (*StateGetCall) Do

func (c *StateGetCall) Do() (*State, error)

func (*StateGetCall) Fields

func (c *StateGetCall) Fields(s ...googleapi.Field) *StateGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type StateService

type StateService struct {
	// contains filtered or unexported fields
}

func NewStateService

func NewStateService(s *Service) *StateService

func (*StateService) Get

func (r *StateService) Get() *StateGetCall

Get: Get the state of the Dex DB

Jump to

Keyboard shortcuts

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