rclone: github.com/ncw/rclone/backend/webdav/odrvcookie Index | Files

package odrvcookie

import "github.com/ncw/rclone/backend/webdav/odrvcookie"

Package odrvcookie can fetch authentication cookies for a sharepoint webdav endpoint


Package Files

fetch.go renew.go

type CookieAuth Uses

type CookieAuth struct {
    // contains filtered or unexported fields

CookieAuth hold the authentication information These are username and password as well as the authentication endpoint

func New Uses

func New(pUser, pPass, pEndpoint string) CookieAuth

New creates a new CookieAuth struct

func (*CookieAuth) Cookies Uses

func (ca *CookieAuth) Cookies(ctx context.Context) (*CookieResponse, error)

Cookies creates a CookieResponse. It fetches the auth token and then retrieves the Cookies

type CookieRenew Uses

type CookieRenew struct {
    // contains filtered or unexported fields

CookieRenew holds information for the renew

func NewRenew Uses

func NewRenew(interval time.Duration, renewFn func()) *CookieRenew

NewRenew returns and starts a CookieRenew

func (*CookieRenew) Renew Uses

func (c *CookieRenew) Renew()

Renew calls the renewFn for every tick

type CookieResponse Uses

type CookieResponse struct {
    RtFa    http.Cookie
    FedAuth http.Cookie

CookieResponse contains the requested cookies

type ErrorResponseBody Uses

type ErrorResponseBody struct {
    XMLName   xml.Name
    FaultCode string `xml:"Fault>Code>Subcode>Value"`
    Reason    string `xml:"Fault>Reason>Text"`
    Detail    string `xml:"Fault>Detail>error>internalerror>text"`

ErrorResponseBody contains the body of an erroneous response

type SharepointError Uses

type SharepointError struct {
    XMLName xml.Name          `xml:"Envelope"`
    Body    ErrorResponseBody `xml:"Body"`

SharepointError holds an error response microsoft login

func (*SharepointError) Error Uses

func (e *SharepointError) Error() string

type SharepointSuccessResponse Uses

type SharepointSuccessResponse struct {
    XMLName xml.Name            `xml:"Envelope"`
    Body    SuccessResponseBody `xml:"Body"`

SharepointSuccessResponse holds a response from a successful microsoft login

type SuccessResponseBody Uses

type SuccessResponseBody struct {
    XMLName xml.Name
    Type    string    `xml:"RequestSecurityTokenResponse>TokenType"`
    Created time.Time `xml:"RequestSecurityTokenResponse>Lifetime>Created"`
    Expires time.Time `xml:"RequestSecurityTokenResponse>Lifetime>Expires"`
    Token   string    `xml:"RequestSecurityTokenResponse>RequestedSecurityToken>BinarySecurityToken"`

SuccessResponseBody is the body of a successful response, it holds the token

Package odrvcookie imports 14 packages (graph). Updated 2020-06-19. Refresh now. Tools for package owners.