Example #1
0
func FromClient(client osin.Client) *ClientModel {
	return &ClientModel{
		Id:          client.GetId(),
		Secret:      client.GetSecret(),
		RedirectUri: client.GetRedirectUri(),
	}
}
Example #2
0
//SetClient stores the client info in the datastore
func (s *AEServer) SetClient(c context.Context, client osin.Client) error {
	cm := FromClient(client)

	cm.Id = client.GetId()
	cm.Secret = client.GetSecret()
	cm.RedirectUri = client.GetRedirectUri()

	key := datastore.NewKey(c, ClientKind, cm.GetId(), 0, nil)
	datastore.Put(c, key, cm)

	return nil
}
Example #3
0
func (d *PPClient) CopyFrom(client osin.Client) {
	d.Id = client.GetId()
	d.Secret = client.GetSecret()
	d.RedirectUri = client.GetRedirectUri()
	d.UserData = client.GetUserData()
}