Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

passport authorization of 3rd party app - accessing /oauth/authorize with token based user from front app

i have a website with separate fornt(vue) and backend (laravel) applications

im using passport for authentication , generating personal access token for users and storing it in front application , and sending request with Bearer authToken to backend from front app for protected routes

i have a password grant client to generate these tokens

now im trying to grant another website users to access their information in my website , so i have created a new passport client for 3rd party apps

and ask for authorization from 3rd app using that client

     $query = http_build_query([
        'client_id' => config('mywebsite.auth_client_id'),
        'redirect_uri' => route('thisapp.callback'),
        'response_type' => 'code',
        'scope' => '',
        'state' => Str::uuid()->toString() ,
    ]);
    
    return ['url' => config('mywebsite.mywebsite_url') .'/oauth/authorize?'.$query];

which generates a authorizations url

http://api.mywebsite.com/oauth/authorize?....

the problem is this will generate a backend route , which is protected by auth:web

users need to login in my backend directly which means i need a frontent app for login in my backend app

i tried to call this route via my front app with user token , but apparently this route is protected with web/session guard and dont recognize my front token

i've tried to change the guard in config/passport to api so the route works with token/api guard but im getting this error

"message": "Laravel\Passport\Http\Controllers\AuthorizationController::__construct(): Argument #2 ($guard) must be of type Illuminate\Contracts\Auth\StatefulGuard, Laravel\Passport\Guards\TokenGuard given",

i tried to overwrite the route with auth:api middleware

Route::get('/oauth/authorize', [\Laravel\Passport\Http\Controllers\AuthorizationController::class, 'authorize'])->middleware('auth:api');

but still asking for log in when i call the route with my auth token

is there any way to call these routes with api/token logged user from front end instead of web/session in the backend ?

REVIEW: Dogland: Passion, Glory, and Lots of Slobber at the Westminster Dog Show by Tommy Tomlinson

From Pulitzer Prize finalist Tommy Tomlinson comes an inside account of the Westminster Dog Show that follows one dog on his quest to become a champion—and explores the bond between dogs and their people.

Tommy Tomlinson was watching a dog show on television a few years ago when he had a sudden thought: Are those dogs happy? How about pet dogs—are they happy? Those questions sparked a quest to venture inside the dog-show world, in search of a deeper understanding of the relationship between dogs and humans that has endured for thousands of years. Dogland shares his surprising, entertaining, and moving adventures.

Tomlinson spends three years on the road and goes behind the scenes at more than one hundred competitions across the country, from Midwestern fairgrounds to Madison Square Garden. Along the way he is licked, sniffed, and rubbed up against by dogs of nearly every size, shape, and breed. Like a real-life version of the classic mockumentary Best in Show, Dogland follows one champion show dog—a Samoyed named Striker—as well as his handler, Laura King, and his devoted entourage of breeders and owners as he competes in the 2022 Westminster Dog Show.

Striker’s whole career has been leading up to this moment. As Tomlinson writes, picking a top show dog is like drafting an NFL quarterback when they’re still in elementary school. Now Striker has made it to the Super Bowl. Tomlinson takes readers on the long road to glory, bringing the dog-show circuit to life as he witnesses teams scrambling from town to town in search of championship points and large, colorful ribbons. (Striker and his crew travel in a custom-built RV named after Betty White.)

Tomlinson’s limitless curiosity about people and dogs reaches far beyond the show tents and into the ordinary lives of dogs. We hear from experts who have discovered new insights into how dogs and humans formed their bond—and how that bond has changed over the centuries. We discover the fascinating origins of different dog breeds, learn about the elaborate breed standards that determine an ideal show dog, and consider the health issues that can arise in purebred dogs. We also meet dog lovers who applaud every dog, regardless of breed, simply for being themselves, such as WeRateDogs, the social media phenomenon with millions of followers, all for posts celebrating the day-to-day goofiness in most dog owners’ lives.

Engaging, charming, and insightful, Dogland is an irresistibly appealing read that invites us on a rollicking backstage tour through the rituals, tricks, and wonders of the dog-show world—and reveals what matters most for the happiness of dogs and dog lovers everywhere.

CW – deaths of loved pets is discussed. The word that properly refers to a female dog is widely used as it is in the fancy.

Review

I grew up with cats. My parents couldn’t agree on what type of dog to get so they compromised on a Siamese cat. It wasn’t until I was an adult and had the space and means that I got my first dog. Eventually I found my breed and more eventually I got to live with a retired show dog. As I pitched it to the publishers to be allowed access to this book, I didn’t finish this dog to his championship. He was a sweetheart who still stopped traffic when we took our daily walks. He got half of my sofa and I got the other half. But I did often wonder, as he lazed away the afternoons, was he happy out of the spotlight? Did he miss those days?

Author Tomlinson goes into the book with a similar question. As he watched a dog show on TV, he too wondered, are those dogs happy? And so he began a years-long journey into the world of showing dogs, one I know a little bit about from having been around dog people and show dog people. I used to go to a “cluster” of shows near where I live and can attest that what he describes about them hasn’t changed from what I saw years ago.

The dog and handler Tomlinson ultimately decided to focus on are Striker a Samoyed and Laura King his professional handler. We learn about how Striker was chosen from his litter as a promising puppy and how he’s lived with King and her partner for over two years on the road to greatness. Stryker is a MBIS (multiple best in show) winner and over the course of the book, his last show – Westminster 2022 – is detailed. I do wonder why an Afghan hound is on the cover instead of the Samoyed who was followed for so much of the book but whatever.

There’s a lot more in the book than just dog shows and show dogs including some short breaks for interesting dog facts, what might be the history of human and first dogs, many things that dogs are capable of doing and tales of Tomlinson’s dog Fred and Scott Van Pelt’s dog Otis. Tomlinson doesn’t shy away from talking about how show dogs are all basically inbred and many suffer from health problems that are visible such as breathing problems for brachycephalic (flat faced) dogs and difficulty whelping for dogs with narrow hips (both of which the now popular Frenchies have) or maybe not visible such as deafness in Dalmatians, heart issues in Dobermans, and a tendency for bloat in bigger, leaner dogs. We have bred these dogs and thus we are the ones who have landed them with these things.

Now about the answer regarding dog happiness? Well, dogs could probably teach a master class in making us think they are happy and like us because they discovered eons ago that life with us is a bit easier than life without us and they know which side their bread is buttered on or rather which bowl their kibble is poured into. Tomlinson says that in all the shows he attended, he never saw any dog abuse. The most he remembers? Maybe a few dogs looking bored. He did see dogs and owners/handlers paying close attention to each other, smiling (and Sammys always look like they’re smiling), and while he was talking to a handler, her dog (Scottish deerhound called Claire named after guess who) watching them, content to be there.

Dogs give us so much. Mostly, they just want to be there with us. One time I took my retired show dog to a specialty show near me. At first he perked up as if to say, “Oh, I’m going to do this again? Okay.” When we just stood by various rings and watched he settled down and seemed to enjoy doing just that, with me. Then we came home, he jumped on the sofa and we watched a bit of mindless TV. Was he happy at the show again? Maybe. Was he happy to be back home? Yes, he was.

This book is informative, chatty, thought provoking, and will give you plenty of inside scoop on “the fancy” as the dog showing world is known. And yes, they know about the spoof movie “Best in Show.” For a lovely tribute to one family’s dog, type “One Big Thing: Otis the King | SC with SVP” into the search function on youtube. Have some tissues handy. B

~Jayne

AmazonBNKoboBook DepositoryGoogle

❌
❌